Commit 022ed63
Pedram Razavi
Fix extra underscore getting added to properties that start with double underscores
Internally, typescript seems to add an extra underscore to identifiers
that start with two underscores and based on
https://github.com/microsoft/TypeScript-wiki/blob/master/API-Breaking-Changes.md#typescript-30
unescapeLeadingUnderscores is the type-safe way of inverting this:
"...the typesafe escapeLeadingUnderscores and unescapeLeadingUnderscores
should be used if the types indicate they are required (as they are used
to convert to or from branded __String and string types)."1 parent 2802a61 commit 022ed63
File tree
3 files changed
+18
-1
lines changed- src
- tests/test-cases/ts-escaped-identifiers
3 files changed
+18
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
253 | 253 | | |
254 | 254 | | |
255 | 255 | | |
256 | | - | |
| 256 | + | |
257 | 257 | | |
258 | 258 | | |
259 | 259 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
0 commit comments