Skip to content

Commit 9adfb14

Browse files
committed
Minor text fixes
1 parent e3a1cb1 commit 9adfb14

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

src/compiler/checker.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13573,7 +13573,7 @@ namespace ts {
1357313573

1357413574
function getAliasSymbolForTypeNode(node: Node) {
1357513575
let host = node.parent;
13576-
while (isParenthesizedTypeNode(host) || host.kind === SyntaxKind.NamedTupleMember || isTypeOperatorNode(host) && host.operator === SyntaxKind.ReadonlyKeyword) {
13576+
while (isParenthesizedTypeNode(host) || isTypeOperatorNode(host) && host.operator === SyntaxKind.ReadonlyKeyword) {
1357713577
host = host.parent;
1357813578
}
1357913579
return isTypeAlias(host) ? getSymbolOfNode(host) : undefined;
@@ -30199,7 +30199,7 @@ namespace ts {
3019930199
seenNamedElement = true;
3020030200
}
3020130201
else if (seenNamedElement) {
30202-
grammarErrorOnNode(e, Diagnostics.Tuple_members_must_all_have_names_or_not_have_names);
30202+
grammarErrorOnNode(e, Diagnostics.Tuple_members_must_all_have_names_or_all_not_have_names);
3020330203
break;
3020430204
}
3020530205
if (isTupleRestElement(e)) {

src/compiler/diagnosticMessages.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3517,7 +3517,7 @@
35173517
"category": "Error",
35183518
"code": 5083
35193519
},
3520-
"Tuple members must all have names or not have names.": {
3520+
"Tuple members must all have names or all not have names.": {
35213521
"category": "Error",
35223522
"code": 5084
35233523
},

tests/baselines/reference/namedTupleMembersErrors.errors.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
tests/cases/conformance/types/tuple/named/namedTupleMembersErrors.ts(1,41): error TS5084: Tuple members must all have names or not have names.
2-
tests/cases/conformance/types/tuple/named/namedTupleMembersErrors.ts(3,32): error TS5084: Tuple members must all have names or not have names.
3-
tests/cases/conformance/types/tuple/named/namedTupleMembersErrors.ts(5,32): error TS5084: Tuple members must all have names or not have names.
1+
tests/cases/conformance/types/tuple/named/namedTupleMembersErrors.ts(1,41): error TS5084: Tuple members must all have names or all not have names.
2+
tests/cases/conformance/types/tuple/named/namedTupleMembersErrors.ts(3,32): error TS5084: Tuple members must all have names or all not have names.
3+
tests/cases/conformance/types/tuple/named/namedTupleMembersErrors.ts(5,32): error TS5084: Tuple members must all have names or all not have names.
44
tests/cases/conformance/types/tuple/named/namedTupleMembersErrors.ts(7,29): error TS5086: A labeled tuple element is declared as optional with a question mark after the name and before the colon, rather than after the type.
55
tests/cases/conformance/types/tuple/named/namedTupleMembersErrors.ts(9,46): error TS5087: A labeled tuple element is declared as rest with a `...` before the name, rather than before the type.
66
tests/cases/conformance/types/tuple/named/namedTupleMembersErrors.ts(11,49): error TS5087: A labeled tuple element is declared as rest with a `...` before the name, rather than before the type.
@@ -14,15 +14,15 @@ tests/cases/conformance/types/tuple/named/namedTupleMembersErrors.ts(18,44): err
1414
==== tests/cases/conformance/types/tuple/named/namedTupleMembersErrors.ts (11 errors) ====
1515
export type Segment1 = [length: number, number]; // partially named, disallowed
1616
~~~~~~
17-
!!! error TS5084: Tuple members must all have names or not have names.
17+
!!! error TS5084: Tuple members must all have names or all not have names.
1818

1919
export type List = [item: any, ...any]; // partially named, disallowed
2020
~~~~~~
21-
!!! error TS5084: Tuple members must all have names or not have names.
21+
!!! error TS5084: Tuple members must all have names or all not have names.
2222

2323
export type Pair = [item: any, any?]; // partially named, disallowed
2424
~~~~
25-
!!! error TS5084: Tuple members must all have names or not have names.
25+
!!! error TS5084: Tuple members must all have names or all not have names.
2626

2727
export type Opt = [element: string?]; // question mark on element disallowed
2828
~~~~~~~

0 commit comments

Comments
 (0)