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
40 lines
468 B
TypeScript
40 lines
468 B
TypeScript
// @declaration: true
|
|
enum T1 {
|
|
a = `1`
|
|
}
|
|
|
|
enum T2 {
|
|
a = `1`,
|
|
b = "2",
|
|
c = 3
|
|
}
|
|
|
|
enum T3 {
|
|
a = `1` + `1`
|
|
}
|
|
|
|
enum T4 {
|
|
a = `1`,
|
|
b = `1` + `1`,
|
|
c = `1` + "2",
|
|
d = "2" + `1`,
|
|
e = "2" + `1` + `1`
|
|
}
|
|
|
|
enum T5 {
|
|
a = `1`,
|
|
b = `1` + `2`,
|
|
c = `1` + `2` + `3`,
|
|
d = 1
|
|
}
|
|
|
|
enum T6 {
|
|
a = 1,
|
|
b = `12`.length
|
|
}
|
|
|
|
declare enum T7 {
|
|
a = `1`,
|
|
b = `1` + `1`,
|
|
c = "2" + `1`
|
|
}
|