We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 68b4a9f commit 7069f67Copy full SHA for 7069f67
packages/complex-types/src/core/printer.ts
@@ -27,10 +27,6 @@ export class Printer {
27
].join(separator);
28
}
29
30
- private isSymbolOptional(symbol: ts.Symbol): boolean {
31
- return !!(symbol.flags & ts.SymbolFlags.Optional);
32
- }
33
-
34
private printConditionType(type: ts.ConditionalType, inner: boolean): string {
35
const decl = type.root.node;
36
const { trueType, falseType } = decl;
@@ -95,7 +91,7 @@ export class Printer {
95
91
96
92
props[name] = {
97
93
value: this.printType(propType, true),
98
- isOptional: this.isSymbolOptional(prop),
94
+ isOptional: !!(prop.flags & ts.SymbolFlags.Optional),
99
};
100
101
0 commit comments