From fcc1929c1626c0fff39ef531821184b9c5d87fd3 Mon Sep 17 00:00:00 2001 From: Alexander T Date: Wed, 12 Aug 2020 06:39:27 +0000 Subject: [PATCH] Cherry-pick PR #40005 into release-4.0 Component commits: fa1ed85593 feat(40004): make isNamedTupleMember public --- 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 185b4d61e381a..9de08306fa167 100644 --- a/src/compiler/factory/nodeTests.ts +++ b/src/compiler/factory/nodeTests.ts @@ -177,6 +177,10 @@ namespace ts { return node.kind === SyntaxKind.TupleType; } + export function isNamedTupleMember(node: Node): node is NamedTupleMember { + return node.kind === SyntaxKind.NamedTupleMember; + } + export function isOptionalTypeNode(node: Node): node is OptionalTypeNode { return node.kind === SyntaxKind.OptionalType; } diff --git a/tests/baselines/reference/api/tsserverlibrary.d.ts b/tests/baselines/reference/api/tsserverlibrary.d.ts index 2600bfaea347f..aad052326e024 100644 --- a/tests/baselines/reference/api/tsserverlibrary.d.ts +++ b/tests/baselines/reference/api/tsserverlibrary.d.ts @@ -4306,6 +4306,7 @@ declare namespace ts { function isTypeLiteralNode(node: Node): node is TypeLiteralNode; function isArrayTypeNode(node: Node): node is ArrayTypeNode; function isTupleTypeNode(node: Node): node is TupleTypeNode; + function isNamedTupleMember(node: Node): node is NamedTupleMember; function isOptionalTypeNode(node: Node): node is OptionalTypeNode; function isRestTypeNode(node: Node): node is RestTypeNode; function isUnionTypeNode(node: Node): node is UnionTypeNode; diff --git a/tests/baselines/reference/api/typescript.d.ts b/tests/baselines/reference/api/typescript.d.ts index fefe6eda25ff9..67e35224b4b96 100644 --- a/tests/baselines/reference/api/typescript.d.ts +++ b/tests/baselines/reference/api/typescript.d.ts @@ -4306,6 +4306,7 @@ declare namespace ts { function isTypeLiteralNode(node: Node): node is TypeLiteralNode; function isArrayTypeNode(node: Node): node is ArrayTypeNode; function isTupleTypeNode(node: Node): node is TupleTypeNode; + function isNamedTupleMember(node: Node): node is NamedTupleMember; function isOptionalTypeNode(node: Node): node is OptionalTypeNode; function isRestTypeNode(node: Node): node is RestTypeNode; function isUnionTypeNode(node: Node): node is UnionTypeNode;