From 4cfc59bfb184c45960320c523bf029ad83c4dd9b Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Thu, 2 Jun 2022 21:12:36 +0000 Subject: [PATCH] Cherry-pick PR #49313 into release-4.7 Component commits: 00b7574003 fix(49306): add isImportTypeAssertionContainer helper --- src/compiler/factory/nodeTests.ts | 4 ++++ tests/baselines/reference/api/tsserverlibrary.d.ts | 1 + tests/baselines/reference/api/typescript.d.ts | 1 + 3 files changed, 6 insertions(+) diff --git a/src/compiler/factory/nodeTests.ts b/src/compiler/factory/nodeTests.ts index cf473caf65bf7..d4ae3767cf096 100644 --- a/src/compiler/factory/nodeTests.ts +++ b/src/compiler/factory/nodeTests.ts @@ -597,6 +597,10 @@ namespace ts { return node.kind === SyntaxKind.ImportClause; } + export function isImportTypeAssertionContainer(node: Node): node is ImportTypeAssertionContainer { + return node.kind === SyntaxKind.ImportTypeAssertionContainer; + } + export function isAssertClause(node: Node): node is AssertClause { return node.kind === SyntaxKind.AssertClause; } diff --git a/tests/baselines/reference/api/tsserverlibrary.d.ts b/tests/baselines/reference/api/tsserverlibrary.d.ts index f7e45674ac056..3c0a87593c61e 100644 --- a/tests/baselines/reference/api/tsserverlibrary.d.ts +++ b/tests/baselines/reference/api/tsserverlibrary.d.ts @@ -4720,6 +4720,7 @@ declare namespace ts { function isImportEqualsDeclaration(node: Node): node is ImportEqualsDeclaration; function isImportDeclaration(node: Node): node is ImportDeclaration; function isImportClause(node: Node): node is ImportClause; + function isImportTypeAssertionContainer(node: Node): node is ImportTypeAssertionContainer; function isAssertClause(node: Node): node is AssertClause; function isAssertEntry(node: Node): node is AssertEntry; function isNamespaceImport(node: Node): node is NamespaceImport; diff --git a/tests/baselines/reference/api/typescript.d.ts b/tests/baselines/reference/api/typescript.d.ts index fb0a5a0c1e756..2e19019614600 100644 --- a/tests/baselines/reference/api/typescript.d.ts +++ b/tests/baselines/reference/api/typescript.d.ts @@ -4720,6 +4720,7 @@ declare namespace ts { function isImportEqualsDeclaration(node: Node): node is ImportEqualsDeclaration; function isImportDeclaration(node: Node): node is ImportDeclaration; function isImportClause(node: Node): node is ImportClause; + function isImportTypeAssertionContainer(node: Node): node is ImportTypeAssertionContainer; function isAssertClause(node: Node): node is AssertClause; function isAssertEntry(node: Node): node is AssertEntry; function isNamespaceImport(node: Node): node is NamespaceImport;