TypeScript/tests/baselines/reference/sliceResultCast.types
Wesley Wigham 85c9d2cc89
Use faster, stricter prop type comparison when merging props in union prop creation (#43696)
* Use faster, stricter prop type comparison when merging props in union prop creation

* Be better at determining this usage in methods, accept baselines

* Small style change
2021-04-19 15:25:12 -07:00

13 lines
595 B
Plaintext

=== tests/cases/compiler/sliceResultCast.ts ===
declare var x: [number, string] | [number, string, string];
>x : [number, string] | [number, string, string]
x.slice(1) as readonly string[];
>x.slice(1) as readonly string[] : readonly string[]
>x.slice(1) : (string | number)[]
>x.slice : ((start?: number, end?: number) => (string | number)[]) | ((start?: number, end?: number) => (string | number)[])
>x : [number, string] | [number, string, string]
>slice : ((start?: number, end?: number) => (string | number)[]) | ((start?: number, end?: number) => (string | number)[])
>1 : 1