enum Btn {
Hello = 123,
}
const test1 = Btn.Hello
let test2: Btn.Hello
Gets autofixed to:
enum Button {
Hello = 123,
}
const test1 = Button.Hello
let test2: Btn.Hello
function test3(testParameter: Btn): Btn {
return Button.Hello
}
Note how the value positions are fixed, but the type positions are not.
Same with classes:
class Btn {}
const test1 = new Btn()
let test2: Btn
function test3(testParameter: Btn): Btn {
return new Btn()
}
fixed:
class Button {}
const test1 = new Button()
let test2: Btn
function test3(testParameter: Btn): Btn {
return new Button()
}
Interfaces and type aliases do not get flagged at all:
interface Btn {}
type Btn2 = {}
(no error)
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too