TypeScript/tests/baselines/reference/namedTupleMembersErrors.errors.txt

67 lines
5.3 KiB
Plaintext

tests/cases/conformance/types/tuple/named/namedTupleMembersErrors.ts(1,41): error TS5084: Tuple members must all have names or all not have names.
tests/cases/conformance/types/tuple/named/namedTupleMembersErrors.ts(2,25): error TS5084: Tuple members must all have names or all not have names.
tests/cases/conformance/types/tuple/named/namedTupleMembersErrors.ts(4,32): error TS5084: Tuple members must all have names or all not have names.
tests/cases/conformance/types/tuple/named/namedTupleMembersErrors.ts(5,22): error TS5084: Tuple members must all have names or all not have names.
tests/cases/conformance/types/tuple/named/namedTupleMembersErrors.ts(7,32): error TS5084: Tuple members must all have names or all not have names.
tests/cases/conformance/types/tuple/named/namedTupleMembersErrors.ts(8,22): error TS5084: Tuple members must all have names or all not have names.
tests/cases/conformance/types/tuple/named/namedTupleMembersErrors.ts(10,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.
tests/cases/conformance/types/tuple/named/namedTupleMembersErrors.ts(12,46): error TS5087: A labeled tuple element is declared as rest with a '...' before the name, rather than before the type.
tests/cases/conformance/types/tuple/named/namedTupleMembersErrors.ts(14,49): error TS5087: A labeled tuple element is declared as rest with a '...' before the name, rather than before the type.
tests/cases/conformance/types/tuple/named/namedTupleMembersErrors.ts(14,52): error TS8020: JSDoc types can only be used inside documentation comments.
tests/cases/conformance/types/tuple/named/namedTupleMembersErrors.ts(16,39): error TS5085: A tuple member cannot be both optional and rest.
tests/cases/conformance/types/tuple/named/namedTupleMembersErrors.ts(18,44): error TS2574: A rest element type must be an array type.
tests/cases/conformance/types/tuple/named/namedTupleMembersErrors.ts(20,13): error TS2456: Type alias 'RecusiveRestUnlabeled' circularly references itself.
tests/cases/conformance/types/tuple/named/namedTupleMembersErrors.ts(21,13): error TS2456: Type alias 'RecusiveRest' circularly references itself.
==== tests/cases/conformance/types/tuple/named/namedTupleMembersErrors.ts (14 errors) ====
export type Segment1 = [length: number, number]; // partially named, disallowed
~~~~~~
!!! error TS5084: Tuple members must all have names or all not have names.
export type Segment2 = [number, size: number]; // partially named, disallowed
~~~~~~
!!! error TS5084: Tuple members must all have names or all not have names.
export type List = [item: any, ...any]; // partially named, disallowed
~~~~~~
!!! error TS5084: Tuple members must all have names or all not have names.
export type List2 = [any, ...remainder: any]; // partially named, disallowed
~~~
!!! error TS5084: Tuple members must all have names or all not have names.
export type Pair = [item: any, any?]; // partially named, disallowed
~~~~
!!! error TS5084: Tuple members must all have names or all not have names.
export type Pair2 = [any, last?: any]; // partially named, disallowed
~~~
!!! error TS5084: Tuple members must all have names or all not have names.
export type Opt = [element: string?]; // question mark on element disallowed
~~~~~~~
!!! 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.
export type Trailing = [first: string, rest: ...string[]]; // dots on element disallowed
~~~~~~~~~~~
!!! error TS5087: A labeled tuple element is declared as rest with a '...' before the name, rather than before the type.
export type OptTrailing = [first: string, rest: ...string[]?]; // dots+question on element disallowed
~~~~~~~~~~~~
!!! error TS5087: A labeled tuple element is declared as rest with a '...' before the name, rather than before the type.
~~~~~~~~~
!!! error TS8020: JSDoc types can only be used inside documentation comments.
export type OptRest = [first: string, ...rest?: string[]]; // rest+optional disallowed
~~~~~~~~~~~~~~~~~~
!!! error TS5085: A tuple member cannot be both optional and rest.
export type NonArrayRest = [first: string, ...rest: number]; // non-arraylike rest, disallowed
~~~~~~~~~~~~~~~
!!! error TS2574: A rest element type must be an array type.
export type RecusiveRestUnlabeled = [string, ...RecusiveRestUnlabeled];
~~~~~~~~~~~~~~~~~~~~~
!!! error TS2456: Type alias 'RecusiveRestUnlabeled' circularly references itself.
export type RecusiveRest = [first: string, ...rest: RecusiveRest]; // marked as incorrect, same as above
~~~~~~~~~~~~
!!! error TS2456: Type alias 'RecusiveRest' circularly references itself.