Skip to content

Commit 20111a6

Browse files
authored
feat(spec): export list of all jsii features (#5021)
Exports a new constant `ALL_SPEC_FEATURES` containing all available jsii extension features. This allows consumers of the `@jsii/spec` package to programmatically access the complete list of features without having to maintain their own copy. --- By submitting this pull request, I confirm that my contribution is made under the terms of the [Apache 2.0 license]. [Apache 2.0 license]: https://www.apache.org/licenses/LICENSE-2.0
1 parent 525113a commit 20111a6

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

packages/@jsii/spec/src/assembly.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1090,9 +1090,17 @@ export function describeTypeReference(type?: TypeReference): string {
10901090
}
10911091

10921092
/**
1093-
* Predefined constants for a set of jsii extension features
1093+
* A list of all jsii extension features
10941094
*/
1095-
export type JsiiFeature = 'intersection-types' | 'class-covariant-overrides';
1095+
export const ALL_SPEC_FEATURES = [
1096+
'intersection-types',
1097+
'class-covariant-overrides',
1098+
] as const;
1099+
1100+
/**
1101+
* Predefined type constants of available jsii extension features
1102+
*/
1103+
export type JsiiFeature = (typeof ALL_SPEC_FEATURES)[number];
10961104

10971105
/**
10981106
* Determines whether an entity is deprecated.

0 commit comments

Comments
 (0)