-
Notifications
You must be signed in to change notification settings - Fork 21
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
[Feature request] Include TypeScript types #43
Comments
Given it seems to be just a few files, I'd be happy to merge a PR that adds this. |
Is it worth making oss-serverless/types[script] package? |
I think integrating the types directly is much better developer experience, because IMO a separate types package makes it unnecessarily complicated to release new features and it risks that the implementation doesn't match the types (like it is now with Serverless). |
Phew. That’s what I would prefer as well. |
+1 I don't want to maintain another package and have it become out of date 😅 |
Has PR: #45 |
Thank you for the PR! Unfortunately, these are the wrong types 😅 The package @serverless/typescript only contains the types for the They define a local plugin called This plugin defines a command The plugin uses the serverless/lib/plugins/aws/provider.js Lines 261 to 1685 in 28dbd19
I think there are three options how we can implement the types:
|
No worries, will use the package method then and close the PR there 👍 (PR is closed) |
@mnapoli what do you think regarding the possible options to include the types? I would lean towards option 2) to simply copy/generate the types once so we can fix any current or future type issues. |
@zirkelc agreed, that sounds simple 👍 I don't expect too many modifications to types, and we can always change back to a script later if needed. |
I don't mind fixing the script so it's more up to date. |
Copying the types is simpler. |
The problem is not the script itself, it's that JSON Schema cannot perfectly a describe TypeScript type. See this comment for more information: serverless/typescript#27 (comment)
So copying the type from the v3.38.0 commit should. be a good starting point: serverless/typescript@47fe5fa |
Serverless provides the TypeScript types in a separate package @serverless/typescript which is outdated and has a few open issues, like this serverless/typescript#27 which more than 4 years old and has a simple fix described in this comment serverless/typescript#27 (comment)
I'd like to know if you would interested in including the types directly into this package. I could prepare a new PR that simply copies the types from @serverless/typescript and then we could gradually fix them over time.
The text was updated successfully, but these errors were encountered: