Remove isJSDocOptionalParameter and isOptionalDeclaration from public API (#51908)

This commit is contained in:
Oleksandr T
2022-12-15 11:45:17 -08:00
committed by GitHub
parent 44e8244dd9
commit ff919e3b76
3 changed files with 2 additions and 4 deletions
+2
View File
@@ -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:
-2
View File
@@ -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;
-2
View File
@@ -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;