New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@types/serverless

Package Overview
Dependencies
Maintainers
1
Versions
94
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/serverless

TypeScript definitions for serverless

  • 1.78.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
54K
decreased by-33.36%
Maintainers
1
Weekly downloads
 
Created

What is @types/serverless?

@types/serverless provides TypeScript definitions for the Serverless Framework, allowing developers to use TypeScript's type-checking features when working with Serverless applications.

What are @types/serverless's main functionalities?

Serverless Configuration

This feature allows you to define the configuration for a Serverless service, including the provider, runtime, and functions. The TypeScript definitions help ensure that the configuration adheres to the expected structure.

{
  "service": "my-service",
  "provider": {
    "name": "aws",
    "runtime": "nodejs14.x"
  },
  "functions": {
    "hello": {
      "handler": "handler.hello"
    }
  }
}

Function Definitions

This feature allows you to define functions and their associated events, such as HTTP endpoints. The TypeScript definitions provide type-checking for the function configuration, ensuring that the events and handlers are correctly specified.

{
  "functions": {
    "hello": {
      "handler": "handler.hello",
      "events": [
        {
          "http": {
            "path": "hello",
            "method": "get"
          }
        }
      ]
    }
  }
}

Custom Resources

This feature allows you to define custom AWS resources within your Serverless application. The TypeScript definitions help ensure that the resource configurations are valid and correctly structured.

{
  "resources": {
    "Resources": {
      "MyDynamoDBTable": {
        "Type": "AWS::DynamoDB::Table",
        "Properties": {
          "TableName": "my-table",
          "AttributeDefinitions": [
            {
              "AttributeName": "id",
              "AttributeType": "S"
            }
          ],
          "KeySchema": [
            {
              "AttributeName": "id",
              "KeyType": "HASH"
            }
          ],
          "ProvisionedThroughput": {
            "ReadCapacityUnits": 5,
            "WriteCapacityUnits": 5
          }
        }
      }
    }
  }
}

Other packages similar to @types/serverless

FAQs

Package last updated on 05 Oct 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc