File tree Expand file tree Collapse file tree 1 file changed +0
-86
lines changed Expand file tree Collapse file tree 1 file changed +0
-86
lines changed Original file line number Diff line number Diff line change @@ -45,89 +45,3 @@ const serverlessConfiguration: AWS = {
4545
4646module .exports = serverlessConfiguration ;
4747```
48-
49- ## Remaining improvements
50-
51- ### Use Record<> instead
52-
53- ``` js
54- awsKmsArn: { type: ' object' }
55- ```
56-
57- generates
58-
59- ``` ts
60- export type AwsKmsArn = {
61- [k : string ]: unknown ;
62- }
63- ` ` `
64-
65- It could be improved, to generate
66-
67- ` ` ` ts
68- export type AwsKmsArn = Record <string , unknown >
69- ` ` `
70-
71- ### allOf and anyOf usage for required properties
72-
73- ` ` ` js
74- awsIamPolicyStatement : {
75- type: ' object' ,
76- properties: {
77- a: { type: ' string' },
78- b: { type: ' string' },
79- c: { type: ' string' },
80- }
81- additionalProperties: false ,
82- allOf: [
83- { required: [' a' ] },
84- anyOf :[{ required: [' b' ] }, { required: [' c' ] }],
85- ]
86- }
87- ` ` `
88-
89- generates
90-
91-
92- ` ` ` ts
93- export type awsIamPolicyStatement = {
94- [k : string ]: unknown ;
95- }
96- ` ` `
97-
98-
99- It could be improved, to generate
100-
101- ` ` ` ts
102- export type awsIamPolicyStatement =
103- | {
104- a: string ;
105- b? : string ;
106- c: string ;
107- }
108- | {
109- a: string ;
110- b: string ;
111- c? : string ;
112- }
113- ` ` `
114-
115- ### const keyword
116-
117- ` ` ` js
118- disabledDeprecation : { const: ' *' }
119- ` ` `
120-
121- generates
122-
123- ` ` ` ts
124- export type disabledDeprecation = {
125- [k : string ]: unknown ;
126- }
127- ` ` `
128-
129- It could be improved, to generate
130-
131- ` ` ` ts
132- export type disabledDeprecation = " *"
133- ` ` `
You can’t perform that action at this time.
0 commit comments