Skip to content

Commit

Permalink
Update signatures to avoid post-LKG error (microsoft#48677)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewbranch authored and Jack-Works committed Apr 22, 2022
1 parent c0d6bd5 commit 67e7885
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/deprecatedCompat/deprecations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1125,7 +1125,7 @@ namespace ts {
name: PropertyName | string,
questionToken: QuestionToken | undefined,
type: TypeNode | undefined,
initializer?: Expression
initializer?: Expression | undefined
): PropertySignature {
const node = factory.createPropertySignature(modifiers, name, questionToken, type);
node.initializer = initializer;
Expand Down Expand Up @@ -1187,7 +1187,7 @@ namespace ts {
arguments.length >= 1 && arguments.length <= 3 ? factory.createVariableDeclaration(name, /*exclamationToken*/ undefined, exclamationTokenOrType as TypeNode | undefined, typeOrInitializer as Expression | undefined) :
Debug.fail("Argument count mismatch");
} as {
(name: string | BindingName, type?: TypeNode, initializer?: Expression): VariableDeclaration;
(name: string | BindingName, type?: TypeNode | undefined, initializer?: Expression | undefined): VariableDeclaration;
(name: string | BindingName, exclamationToken: ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): VariableDeclaration;
}, factoryDeprecation);

Expand All @@ -1212,7 +1212,7 @@ namespace ts {
}, factoryDeprecation);

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

Expand All @@ -1228,7 +1228,7 @@ namespace ts {
}, factoryDeprecation);

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

Expand Down

0 comments on commit 67e7885

Please sign in to comment.