Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Samaze123 opened this issue Apr 2, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@Samaze123
Copy link

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)
@Samaze123 Samaze123 added the enhancement New feature or request label Apr 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant