a34fdb203e
* Support template literals in enum declarations * Support template literals in const enum access * Support template literals in swith with typeof narrowing * Support template literals in element access discriminant * Support template literals in ambient module declaration * Unify symbols for template literals in computed properties * Unify expression position checks for template literals * Support template literals in rename and find all references * Mark computed properties with template literals as write access * Inline startsWithQuote
43 lines
978 B
TypeScript
43 lines
978 B
TypeScript
/// <reference path='fourslash.ts' />
|
|
|
|
// @Filename: a.ts
|
|
////interface Obj {
|
|
//// [|[`[|{| "contextRangeIndex": 0 |}num|]`]: number;|]
|
|
//// [|['[|{| "contextRangeIndex": 2 |}bool|]']: boolean;|]
|
|
////}
|
|
////
|
|
////let o: Obj = {
|
|
//// [|[`[|{| "contextRangeIndex": 4 |}num|]`]: 0|],
|
|
//// [|['[|{| "contextRangeIndex": 6 |}bool|]']: true|],
|
|
////};
|
|
////
|
|
////o = {
|
|
//// [|['[|{| "contextRangeIndex": 8 |}num|]']: 1|],
|
|
//// [|[`[|{| "contextRangeIndex": 10 |}bool|]`]: false|],
|
|
////};
|
|
////
|
|
////o.[|num|];
|
|
////o['[|num|]'];
|
|
////o["[|num|]"];
|
|
////o[`[|num|]`];
|
|
////
|
|
////o.[|bool|];
|
|
////o['[|bool|]'];
|
|
////o["[|bool|]"];
|
|
////o[`[|bool|]`];
|
|
////
|
|
////export { o };
|
|
|
|
// @allowJs: true
|
|
// @Filename: b.js
|
|
////import { o as obj } from './a';
|
|
////
|
|
////obj.[|num|];
|
|
////obj[`[|num|]`];
|
|
////
|
|
////obj.[|bool|];
|
|
////obj[`[|bool|]`];
|
|
|
|
verify.rangesWithSameTextAreRenameLocations("num");
|
|
verify.rangesWithSameTextAreRenameLocations("bool");
|