Skip to content

Commit ff919e3

Browse files
authored
Remove isJSDocOptionalParameter and isOptionalDeclaration from public API (microsoft#51908)
1 parent 44e8244 commit ff919e3

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

src/compiler/utilities.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9458,6 +9458,7 @@ export function hasTabstop(node: Node): boolean {
94589458
return getSnippetElement(node)?.kind === SnippetKind.TabStop;
94599459
}
94609460

9461+
/** @internal */
94619462
export function isJSDocOptionalParameter(node: ParameterDeclaration) {
94629463
return isInJSFile(node) && (
94639464
// node.type should only be a JSDocOptionalType when node is a parameter of a JSDocFunctionType
@@ -9466,6 +9467,7 @@ export function isJSDocOptionalParameter(node: ParameterDeclaration) {
94669467
isBracketed || !!typeExpression && typeExpression.type.kind === SyntaxKind.JSDocOptionalType));
94679468
}
94689469

9470+
/** @internal */
94699471
export function isOptionalDeclaration(declaration: Declaration): boolean {
94709472
switch (declaration.kind) {
94719473
case SyntaxKind.PropertyDeclaration:

tests/baselines/reference/api/tsserverlibrary.d.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8795,8 +8795,6 @@ declare namespace ts {
87958795
name: Identifier;
87968796
};
87978797
function emitModuleKindIsNonNodeESM(moduleKind: ModuleKind): boolean;
8798-
function isJSDocOptionalParameter(node: ParameterDeclaration): boolean;
8799-
function isOptionalDeclaration(declaration: Declaration): boolean;
88008798
function createUnparsedSourceFile(text: string): UnparsedSource;
88018799
function createUnparsedSourceFile(inputFile: InputFiles, type: "js" | "dts", stripInternal?: boolean): UnparsedSource;
88028800
function createUnparsedSourceFile(text: string, mapPath: string | undefined, map: string | undefined): UnparsedSource;

tests/baselines/reference/api/typescript.d.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4860,8 +4860,6 @@ declare namespace ts {
48604860
name: Identifier;
48614861
};
48624862
function emitModuleKindIsNonNodeESM(moduleKind: ModuleKind): boolean;
4863-
function isJSDocOptionalParameter(node: ParameterDeclaration): boolean;
4864-
function isOptionalDeclaration(declaration: Declaration): boolean;
48654863
function createUnparsedSourceFile(text: string): UnparsedSource;
48664864
function createUnparsedSourceFile(inputFile: InputFiles, type: "js" | "dts", stripInternal?: boolean): UnparsedSource;
48674865
function createUnparsedSourceFile(text: string, mapPath: string | undefined, map: string | undefined): UnparsedSource;

0 commit comments

Comments
 (0)