Skip to content

Commit

Permalink
Cherry-pick PR #49313 into release-4.7 (#49359)
Browse files Browse the repository at this point in the history
Component commits:
00b7574 fix(49306): add isImportTypeAssertionContainer helper

Co-authored-by: Oleksandr T <[email protected]>
  • Loading branch information
TypeScript Bot and a-tarasyuk authored Jun 2, 2022
1 parent 197aaef commit c07d883
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/compiler/factory/nodeTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
1 change: 1 addition & 0 deletions tests/baselines/reference/api/tsserverlibrary.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions tests/baselines/reference/api/typescript.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c07d883

Please sign in to comment.