Repository navigation
[@types/serverless] Add Serverless Framework v4 types and comprehensive JSDoc documentation - #74484
Conversation
|
@ofri-peretz Thank you for submitting this PR! I see this is your first time submitting to DefinitelyTyped 👋 — I'm the local bot who will help you through the process of getting things through. This is a live comment that I will keep updated. 1 package in this PRCode ReviewsBecause you edited one package and updated the tests (👏), I can help you merge this PR once someone else signs off on it. You can test the changes of this PR in the Playground. Status
All of the items on the list are green. To merge, you need to post a comment including the string "Ready to merge" to bring in your changes. Diagnostic Information: What the bot saw about this PR{
"type": "info",
"now": "-",
"pr_number": 74484,
"author": "ofri-peretz",
"headCommitOid": "7387ede6eba2468218d57f24929f2fc0a9fb8b97",
"mergeBaseOid": "95c727ac6ff4dfa56699b456e6411e1eac718f05",
"lastPushDate": "2026-02-05T22:07:16.000Z",
"lastActivityDate": "2026-02-12T06:49:52.000Z",
"mergeOfferDate": "2026-02-12T06:25:54.000Z",
"mergeRequestDate": "2026-02-12T06:49:52.000Z",
"mergeRequestUser": "ofri-peretz",
"hasMergeConflict": false,
"isFirstContribution": true,
"tooManyFiles": false,
"hugeChange": false,
"popularityLevel": "Popular",
"pkgInfo": [
{
"name": "serverless",
"kind": "edit",
"files": [
{
"path": "types/serverless/plugins/aws/provider/awsProvider.d.ts",
"kind": "definition"
},
{
"path": "types/serverless/serverless-tests.ts",
"kind": "test"
}
],
"owners": [
"hassankhan",
"JonathanWilbur",
"a-pavlenko",
"fredericbarthelet",
"bryan-hunter",
"thomasaribart",
"G-Rath",
"AbdullahAli",
"fargito",
"bacarybruno",
"domazet93"
],
"addedOwners": [],
"deletedOwners": [],
"popularityLevel": "Popular"
}
],
"reviews": [
{
"type": "approved",
"reviewer": "fargito",
"date": "2026-02-12T06:25:13.000Z",
"isMaintainer": false
}
],
"mainBotCommentID": 3856551927,
"ciResult": "pass"
} |
|
🔔 @hassankhan @JonathanWilbur @a-pavlenko @fredericbarthelet @bryan-hunter @ThomasAribart @G-Rath @AbdullahAli @fargito @bacarybruno @domazet93 — please review this PR in the next few days. Be sure to explicitly select |
|
@ofri-peretz The CI build failed! Please review the logs for more information. Once you've pushed the fixes, the build will automatically re-run. Thanks! Note: builds that are failing do not end up on the list of PRs for the DT maintainers to review. |
|
Thanks for the contribution! One thing worth noting - the official I also validated the type changes here and found a few issues: 1. 2. 3. 4. 5. |
|
Thanks for the feedback @czubocha, I'll fix your comments here. I'll check the package you mentioned. |
|
@czubocha, I've addressed all your comments. Please re-review and confirm everything is ok, so the TypeScript team can see your confirmation and proceed. |
|
@czubocha if you’re referring to the Serverless Schema, the JSDoc comments are vital for a smooth developer experience. We use |
|
Thanks @ofri-peretz, the types are looking much better now - the earlier issues have been addressed. I also agree with you on the value of JSDoc comments for developer experience. We'll look into adding Two things I noticed on the
Otherwise looks good to me! |
|
@czubocha thank you, apologies for missing these types. I'll update the PR later today. I would want to add as a consumer that maybe worth after adding these descriptions to highlight or add extra explanation regarding |
… JSDoc documentation - Add v4-specific properties: stages, build, Stages, StageConfig, Build, EsBuildConfig - Add comprehensive JSDoc documentation with @see links to official docs - Fix syntax error in YAML example (*/* pattern breaking JSDoc parsing) - Document all previously undocumented interfaces - Add @SInCE v4 annotations for new properties - Add @deprecated annotations for legacy properties
…rning - Add configFile property to EsBuildConfig for custom esbuild configuration - Add migration warning for users coming from v3 with bundler plugins - Allow build: false to disable native bundling during plugin migration
… types - Add resolvers property to StageConfig for external data sources - Add VaultResolver interface with address, token, version, path options - Add TerraformResolver interface supporting s3, cloud, remote, http backends - Add StageResolvers interface for custom named resolvers - All new types marked with @SInCE v4 annotation
- Replace @minimum/@maximum tags with inline descriptions (CI lint fix) - Add comprehensive tests for v4 types: stages, build, resolvers - Test VaultResolver, TerraformResolver with all backend types - Test EsBuildConfig with all properties - Test backward compatibility with deprecated properties - Test Kafka event with consumerGroupId
Fixes based on @czubocha's review: 1. licenseKey is on the wrong interface - Moved from Provider to root Serverless interface 2. build type is incomplete - Changed from 'Build | false' to 'string | Build | false' - Supports shorthand like 'build: esbuild' 3. observability type is incomplete - Added 'axiom' | 'dashboard' string variants - Added ObservabilityConfig object form with provider and dataset 4. stages.*.resolvers types are incomplete - Changed from StageResolvers to open object { [k: string]: unknown } - Accommodates all 13 built-in resolver types with varying shapes 5. EsBuildConfig is incomplete - Added missing properties: exclude, packages, buildConcurrency - Fixed sourcemap to accept boolean | SourcemapConfig object - Added SourcemapConfig interface with type and setNodeOptions - Added index signature for additional esbuild options Added comprehensive tests for all new features.
Updated the licenseKey test to match the example from Serverless Framework documentation (https://www.serverless.com/framework/docs/guides/license-keys)
4506760 to
7387ede
Compare
|
@czubocha I pushed the updates. Please confirm so the TS team can see that and set the tags as 'approved by owner'. |
|
Confirmed - both fixes look correct. Thanks! |
|
@typescript-bot What's next? How can we proceed? The author has confirmed the PR |
|
@ElizabethSamuel-MSFT @AlexJerabek Can one of you guide me on what comes next after the author of the popular package approves the PR? (I just saw you both able to approve PR and probably can assist) |
@czubocha - can you help me get an approval from one of the owners? https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/serverless/package.json Can one of you approve the PR? @hassankhan @JonathanWilbur @a-pavlenko @fredericbarthelet @bryan-hunter @ThomasAribart @G-Rath @AbdullahAli @fargito @bacarybruno @domazet93 |
|
@ofri-peretz: Everything looks good here. I am ready to merge this PR (at 7387ede) on your behalf whenever you think it's ready. If you'd like that to happen, please post a comment saying:
and I'll merge this PR almost instantly. Thanks for helping out! ❤️ (@hassankhan, @JonathanWilbur, @a-pavlenko, @fredericbarthelet, @bryan-hunter, @ThomasAribart, @G-Rath, @AbdullahAli, @fargito, @bacarybruno, @domazet93: you can do this too.) |
|
Ready to merge |

Summary
This PR adds support for Serverless Framework v4 properties and significantly improves the documentation of the AWS provider type definitions.
Breaking Changes
None. This PR only adds optional properties and documentation. All existing type definitions remain unchanged and backward compatible.
🆕 New v4-Specific Properties (
@since v4)Root
ServerlessInterfacestagesStagesbuildBuild | falseProviderInterfacelicenseKeystringNew Interfaces
StagesStageConfigStageResolversVaultResolverTerraformResolverBuildEsBuildConfigVaultResolverPropertiesaddressstringVAULT_ADDRenv var)tokenstringVAULT_TOKENenv var)versionstringv1)pathstringTerraformResolverPropertiestype's3' | 'cloud' | 'remote' | 'http'bucketstringkeystringregionstringorganizationstringworkspaces{ name?: string }addressstringEsBuildConfigPropertiesconfigFilestringbundlebooleanminifybooleansourcemapbooleanexternalstring[]targetstringplatform'node' | 'browser'The following properties now include
@deprecatedannotations pointing to their modern replacements:ServerlessInterfacevariablesResolutionModetenantorgorgproperty insteadServiceInterfaceawsKmsKeyArnprovider.kmsKeyArnkmsKeyArnat the provider levelProviderInterfacelambdaHashingVersionroleiam.rolerolePermissionsBoundaryiam.role.permissionsBoundaryiamRoleStatementsiam.role.statementsiamManagedPoliciesiam.role.managedPoliciescfnRoleiam.deploymentRolePackageInterfaceincludepatternsAwsFunctionInterfaceawsKmsKeyArnkmsKeyArnkmsKeyArnproperty instead📚 Documentation Improvements
@seelinks to official Serverless Framework documentation@exampleblocks with YAML configuration examplesbuildproperty when using legacy bundler plugins🐛 Bug Fixes
*/*pattern was breaking JSDoc comment parsing (wrapped in quotes:'*/*')Testing
tsc --noEmitReferences