Having some issues with autocompletion in my code. I'm trying to implement autocompletion when using a factory class to create objects:
class Test1 {
method1(){}
}
class Test2 {
method2(){}
}
class Test_Factory {
create(type) {
if (type === "test1") {
return new Test1()
} else if (type === "test2") {
return new Test2()
}
}
}
let factory1 = new Test_Factory()
let tst1 = factory1.create("test1")
tst1. // experiencing autocomplete issues
Any suggestions?