Skip to content

Commit 6972766

Browse files
ikatyangmhegazy
authored andcommitted
Add missing undefined type for createProperty initializer (#16095)
1 parent 2412f8c commit 6972766

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/compiler/factory.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ namespace ts {
303303
: node;
304304
}
305305

306-
export function createProperty(decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, name: string | PropertyName, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer: Expression) {
306+
export function createProperty(decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, name: string | PropertyName, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined) {
307307
const node = <PropertyDeclaration>createSynthesizedNode(SyntaxKind.PropertyDeclaration);
308308
node.decorators = asNodeArray(decorators);
309309
node.modifiers = asNodeArray(modifiers);
@@ -314,7 +314,7 @@ namespace ts {
314314
return node;
315315
}
316316

317-
export function updateProperty(node: PropertyDeclaration, decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, name: PropertyName, type: TypeNode | undefined, initializer: Expression) {
317+
export function updateProperty(node: PropertyDeclaration, decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, name: PropertyName, type: TypeNode | undefined, initializer: Expression | undefined) {
318318
return node.decorators !== decorators
319319
|| node.modifiers !== modifiers
320320
|| node.name !== name

0 commit comments

Comments
 (0)