diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 7583e9f559900..b23d0b42a98fe 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -9458,6 +9458,7 @@ export function hasTabstop(node: Node): boolean { return getSnippetElement(node)?.kind === SnippetKind.TabStop; } +/** @internal */ export function isJSDocOptionalParameter(node: ParameterDeclaration) { return isInJSFile(node) && ( // node.type should only be a JSDocOptionalType when node is a parameter of a JSDocFunctionType @@ -9466,6 +9467,7 @@ export function isJSDocOptionalParameter(node: ParameterDeclaration) { isBracketed || !!typeExpression && typeExpression.type.kind === SyntaxKind.JSDocOptionalType)); } +/** @internal */ export function isOptionalDeclaration(declaration: Declaration): boolean { switch (declaration.kind) { case SyntaxKind.PropertyDeclaration: diff --git a/tests/baselines/reference/api/tsserverlibrary.d.ts b/tests/baselines/reference/api/tsserverlibrary.d.ts index ab63f3b08db66..6f6e0a8fb4b32 100644 --- a/tests/baselines/reference/api/tsserverlibrary.d.ts +++ b/tests/baselines/reference/api/tsserverlibrary.d.ts @@ -8795,8 +8795,6 @@ declare namespace ts { name: Identifier; }; function emitModuleKindIsNonNodeESM(moduleKind: ModuleKind): boolean; - function isJSDocOptionalParameter(node: ParameterDeclaration): boolean; - function isOptionalDeclaration(declaration: Declaration): boolean; function createUnparsedSourceFile(text: string): UnparsedSource; function createUnparsedSourceFile(inputFile: InputFiles, type: "js" | "dts", stripInternal?: boolean): UnparsedSource; function createUnparsedSourceFile(text: string, mapPath: string | undefined, map: string | undefined): UnparsedSource; diff --git a/tests/baselines/reference/api/typescript.d.ts b/tests/baselines/reference/api/typescript.d.ts index 22bef5bbffdc0..7c3088b485c5d 100644 --- a/tests/baselines/reference/api/typescript.d.ts +++ b/tests/baselines/reference/api/typescript.d.ts @@ -4860,8 +4860,6 @@ declare namespace ts { name: Identifier; }; function emitModuleKindIsNonNodeESM(moduleKind: ModuleKind): boolean; - function isJSDocOptionalParameter(node: ParameterDeclaration): boolean; - function isOptionalDeclaration(declaration: Declaration): boolean; function createUnparsedSourceFile(text: string): UnparsedSource; function createUnparsedSourceFile(inputFile: InputFiles, type: "js" | "dts", stripInternal?: boolean): UnparsedSource; function createUnparsedSourceFile(text: string, mapPath: string | undefined, map: string | undefined): UnparsedSource;