• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// @declaration: true
2
3export type Segment1 = [length: number, number]; // partially named, disallowed
4export type Segment2 = [number, size: number]; // partially named, disallowed
5
6export type List = [item: any, ...any];  // partially named, disallowed
7export type List2 = [any, ...remainder: any];  // partially named, disallowed
8
9export type Pair = [item: any, any?];  // partially named, disallowed
10export type Pair2 = [any, last?: any];  // partially named, disallowed
11
12export type Opt = [element: string?]; // question mark on element disallowed
13
14export type Trailing = [first: string, rest: ...string[]]; // dots on element disallowed
15
16export type OptTrailing = [first: string, rest: ...string[]?]; // dots+question on element disallowed
17
18export type OptRest = [first: string, ...rest?: string[]]; // rest+optional disallowed
19
20export type NonArrayRest = [first: string, ...rest: number]; // non-arraylike rest, disallowed
21
22export type RecusiveRestUnlabeled = [string, ...RecusiveRestUnlabeled];
23export type RecusiveRest = [first: string, ...rest: RecusiveRest]; // marked as incorrect, same as above
24