mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
12 lines
412 B
TypeScript
12 lines
412 B
TypeScript
// @strict: true
|
|
// @noEmit: true
|
|
// @noErrorTruncation: false
|
|
// @noTypesAndSymbols: true
|
|
|
|
type Prefix = "a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k";
|
|
type Digit = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9";
|
|
type LargeStringLiteralUnion = `${Prefix}${Digit}${Digit}${Digit}`;
|
|
|
|
const ok: LargeStringLiteralUnion = "a000";
|
|
const bad: LargeStringLiteralUnion = "zzzz";
|