serverless / serverless-google-cloudfunctions

Serverless Google Cloud Functions Plugin – Adds Google Cloud Functions support to the Serverless Framework
https://www.serverless.com
MIT License
272 stars 127 forks source link

feat: Add serverless configuration TS typings #297

Open ericrav opened 1 year ago

ericrav commented 1 year ago

These are generated from the provider JSON schema using the plugin used to generate the AWS Serverless config typings: https://github.com/serverless/typescript

Usage:

// serverless.ts
import type { GCP } from 'serverless-google-cloudfunctions';

const serverlessConfiguration: GCP = {
  provider: {
    name: 'google',
    // ...
  }
};

module.exports = serverlessConfiguration;

A future PR may add this process to the CI workflow so any provider JSON schema changes are automatically captured in changes to the TypeScript .d.ts file, as is done in @serverless/typescript

christopher-caldwell commented 1 year ago

Love this, having the types for the AWS version is really helpful.