# @serverless/typescript

> Serverless typescript definitions

Latest version **4.30.0** (published 2026-01-08) · ISC license · 0 weekly downloads

## Install

```sh
npm install @serverless/typescript
pnpm add @serverless/typescript
yarn add @serverless/typescript
bun add @serverless/typescript
```

## Health

**Score 45/100 (D)** — status: stable.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

## Facts

| | |
|---|---|
| Version | 4.30.0 |
| Published | 2026-01-08 |
| First published | 2020-11-18 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 54.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 146 |
| Author | Frédéric Barthelet |
| Maintainers | ac360, serverless-main |
| Keywords | serverless, sls, typescript |

## Links

- npm: https://www.npmjs.com/package/@serverless/typescript
- Repository: https://github.com/serverless/typescript
- Homepage: https://github.com/serverless/typescript#readme
- Issues: https://github.com/serverless/typescript/issues
- npm.io page: https://npm.io/package/@serverless/typescript

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 4.30.0 (latest) — 2026-01-08
- 3.0.0-pre.0 (pre-3) — 2021-12-06
- 4.29.4 — 2026-01-08
- 4.27.1 — 2025-12-08
- 4.23.0 — 2025-11-06
- 4.20.2 — 2025-10-06
- 4.18.2 — 2025-09-01
- 4.18.0 — 2025-08-06
- 4.17.2 — 2025-07-30
- 4.17.1 — 2025-06-30
- 4.15.1 — 2025-05-28
- 4.14.1 — 2025-04-30
- 4.11.1 — 2025-04-03
- 4.10.1 — 2025-04-01
- 4.9.1 — 2025-03-31
- … 76 more at https://npm.io/package/@serverless/typescript/versions

## README

# serverless/typescript

Typescript definitions for Serverless `serverless.ts` service file.

Since [v1.72.0](https://github.com/serverless/serverless/releases/tag/v1.72.0), the Serverless framework accepts `serverless.ts` as a valid service file in addition to the usual `serverless.yml`, `serverless.json` and `serverless.js` file formats.

This repository serves as a replacement of the community-maintained [DefinitelyTyped @types/serverless package](https://www.npmjs.com/package/@types/serverless). It aims to automate service file TypeScript definitions based on JSON-schema used by [serverless/serverless](https://github.com/serverless/serverless) for validation at the beginning of any Serverless CLI command. This automated pipeline is triggered every time a new release of Serverless framework is available. The pipeline ends with the publishing of the newly generated definitions to NPM, ensuring they are always up to date and consistent with the framework internal validation logic.

![TypeScript definition generation pipeline](https://miro.medium.com/max/1400/1*7TeqkHLkfPEXJ6f2NzbV3A.png)

## Installation

```
npm i @serverless/typescript --save-dev
```

or

```
yarn add @serverless/typescript --dev
```

## Usage

`serverless.ts` file

```ts
import type { AWS } from '@serverless/typescript';

const serverlessConfiguration: AWS = {
  service: 'aws-nodejs-typescript',
  frameworkVersion: '*',
  provider: {
    name: 'aws',
    runtime: 'nodejs12.x',
  },
  functions: {
    hello: {
      handler: 'handler.hello',
      events: [
        {
          http: {
            method: 'get',
            path: 'hello',
          }
        }
      ]
    }
  }
}

module.exports = serverlessConfiguration;
```

## Contributing

> **No PR including modifications on `index.d.ts` will be accepted.** The service file Typescript definitions enclosed within this file are automatically generated at each new Serverless framework release. If any manual modification was added to this file, those would be overwritten during the next Serverless version release and TypeScript definitions generation process.

We love our contributors!

Check out our [help wanted](https://github.com/serverless/typescript/labels/help%20wanted) or [good first issue](https://github.com/serverless/typescript/labels/good%20first%20issue) labels to find issues we want to move forward on with your help.

---
_Source: https://npm.io/package/@serverless/typescript · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
