Skip to content

Add Typescript types definitions for function parameters (i.e. event, context and cb) #258

Open
@Samaze123

Description

@Samaze123

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Proposal

  • What is the proposed change?

Add types definitions in a npm package. Why not @types/scaleway-functions.

  • Who does this proposal help, and why?

All the devs who work with typescript. It will help the developpers maintains the functions with the latests changes as typescript will throw errors when a features becomes decprecated and it will add autocompletion in text editors like VSCode for an easier coding.

Example

In a function function.ts :

export async function handle(event: ScalewayEventFunction, context: ScalewayContextFunction, _cb: ScalewayCallbackFunction)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions