-
Notifications
You must be signed in to change notification settings - Fork 12.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
String literal rename support (#39298)
* add basicly support for rename string literal type * fix merge conflict * fix some behavior * Update package-lock.json * Update package-lock.json * do not break old behavior if not type checked * fix cr issue Co-authored-by: TypeScript Bot <[email protected]>
- Loading branch information
1 parent
ad2e2f8
commit ca7510e
Showing
6 changed files
with
77 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/// <reference path='fourslash.ts'/> | ||
|
||
//// interface Foo { | ||
//// f: '[|foo|]' | 'bar' | ||
//// } | ||
//// const d: 'foo' = 'foo' | ||
//// declare const f: Foo | ||
//// f.f = '[|foo|]' | ||
//// f.f = `[|foo|]` | ||
|
||
verify.rangesWithSameTextAreRenameLocations("foo"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/// <reference path='fourslash.ts'/> | ||
|
||
//// declare function f(): '[|foo|]' | 'bar' | ||
//// class Foo { | ||
//// f = f() | ||
//// } | ||
//// const d: 'foo' = 'foo' | ||
//// declare const ff: Foo | ||
//// ff.f = '[|foo|]' | ||
|
||
verify.rangesWithSameTextAreRenameLocations("foo"); | ||
|
||
interface Foo { | ||
f: 'foo' | 'bar' | ||
} | ||
const d: 'foo' = 'foo' | ||
declare const f: Foo | ||
f.f = 'foo' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters