netlify-lambda-types
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

netlify-lambda-types

Netlify Lambda typescript definitions

These types are intended to make developing netlify handlers in typescript a bit less painful.

They are a reverse-engineered approximation of Netlify's types, not an officially supported definition.

Installation:

npm i -D netlify-lambda-types

Usage:

import { NetlifyFunction } from "netlify-lambda-types";

const handler: NetlifyFunction = async (event, context, callback) => {
  // event, context, and callback are now typed, along with the return type
  return { statusCode: 200, body: "ok" };
};
exports.handler = handler;

Package Sidebar

Install

npm i netlify-lambda-types

Weekly Downloads

178

Version

1.0.0

License

MIT

Unpacked Size

3.47 kB

Total Files

4

Last publish

Collaborators

  • jesseditson