Skip to content

Commit 796be45

Browse files
authored
Update signatures to avoid post-LKG error (microsoft#48677)
1 parent 73c93ee commit 796be45

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/deprecatedCompat/deprecations.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -1125,7 +1125,7 @@ namespace ts {
11251125
name: PropertyName | string,
11261126
questionToken: QuestionToken | undefined,
11271127
type: TypeNode | undefined,
1128-
initializer?: Expression
1128+
initializer?: Expression | undefined
11291129
): PropertySignature {
11301130
const node = factory.createPropertySignature(modifiers, name, questionToken, type);
11311131
node.initializer = initializer;
@@ -1187,7 +1187,7 @@ namespace ts {
11871187
arguments.length >= 1 && arguments.length <= 3 ? factory.createVariableDeclaration(name, /*exclamationToken*/ undefined, exclamationTokenOrType as TypeNode | undefined, typeOrInitializer as Expression | undefined) :
11881188
Debug.fail("Argument count mismatch");
11891189
} as {
1190-
(name: string | BindingName, type?: TypeNode, initializer?: Expression): VariableDeclaration;
1190+
(name: string | BindingName, type?: TypeNode | undefined, initializer?: Expression | undefined): VariableDeclaration;
11911191
(name: string | BindingName, exclamationToken: ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): VariableDeclaration;
11921192
}, factoryDeprecation);
11931193

@@ -1212,7 +1212,7 @@ namespace ts {
12121212
}, factoryDeprecation);
12131213

12141214
/** @deprecated Use `factory.createExportDeclaration` or the factory supplied by your transformation context instead. */
1215-
export const createExportDeclaration = Debug.deprecate(function createExportDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, exportClause: NamedExportBindings | undefined, moduleSpecifier?: Expression, isTypeOnly = false) {
1215+
export const createExportDeclaration = Debug.deprecate(function createExportDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, exportClause: NamedExportBindings | undefined, moduleSpecifier?: Expression | undefined, isTypeOnly = false) {
12161216
return factory.createExportDeclaration(decorators, modifiers, isTypeOnly, exportClause, moduleSpecifier);
12171217
}, factoryDeprecation);
12181218

@@ -1228,7 +1228,7 @@ namespace ts {
12281228
}, factoryDeprecation);
12291229

12301230
/** @deprecated Use `factory.createJSDocParameterTag` or the factory supplied by your transformation context instead. */
1231-
export const createJSDocParamTag = Debug.deprecate(function createJSDocParamTag(name: EntityName, isBracketed: boolean, typeExpression?: JSDocTypeExpression, comment?: string): JSDocParameterTag {
1231+
export const createJSDocParamTag = Debug.deprecate(function createJSDocParamTag(name: EntityName, isBracketed: boolean, typeExpression?: JSDocTypeExpression | undefined, comment?: string | undefined): JSDocParameterTag {
12321232
return factory.createJSDocParameterTag(/*tagName*/ undefined, name, isBracketed, typeExpression, /*isNameFirst*/ false, comment ? factory.createNodeArray([factory.createJSDocText(comment)]) : undefined);
12331233
}, factoryDeprecation);
12341234

0 commit comments

Comments
 (0)