1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
=== tests/cases/compiler/templateLiteralIntersection3.ts ===
type Path = string & { _pathBrand: any };
>Path : Symbol(Path, Decl(templateLiteralIntersection3.ts, 0, 0))
>_pathBrand : Symbol(_pathBrand, Decl(templateLiteralIntersection3.ts, 0, 22))
declare const path: Path;
>path : Symbol(path, Decl(templateLiteralIntersection3.ts, 1, 13))
>Path : Symbol(Path, Decl(templateLiteralIntersection3.ts, 0, 0))
declare const options1: { prop: number; } & { [k: string]: boolean; };
>options1 : Symbol(options1, Decl(templateLiteralIntersection3.ts, 3, 13))
>prop : Symbol(prop, Decl(templateLiteralIntersection3.ts, 3, 25))
>k : Symbol(k, Decl(templateLiteralIntersection3.ts, 3, 47))
options1[`foo`] = false;
>options1 : Symbol(options1, Decl(templateLiteralIntersection3.ts, 3, 13))
options1[`foo/${path}`] = false;
>options1 : Symbol(options1, Decl(templateLiteralIntersection3.ts, 3, 13))
>path : Symbol(path, Decl(templateLiteralIntersection3.ts, 1, 13))
// Lowercase<`foo/${Path}`> => `foo/${Lowercase<Path>}`
declare const lowercasePath: Lowercase<`foo/${Path}`>;
>lowercasePath : Symbol(lowercasePath, Decl(templateLiteralIntersection3.ts, 11, 13))
>Lowercase : Symbol(Lowercase, Decl(lib.es5.d.ts, --, --))
>Path : Symbol(Path, Decl(templateLiteralIntersection3.ts, 0, 0))
options1[lowercasePath] = false;
>options1 : Symbol(options1, Decl(templateLiteralIntersection3.ts, 3, 13))
>lowercasePath : Symbol(lowercasePath, Decl(templateLiteralIntersection3.ts, 11, 13))
|