E
E
eewynell2021-03-20 13:34:12
JavaScript
eewynell, 2021-03-20 13:34:12

Why doesn't VSCode see the variable's type?

vhgga1C.png
VSCode sees the type of the class and the return type of the constructor, but does not see the type of the variable... why is that?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sun_Day, 2021-03-20
@Sun_Day

Because the repl variable must have an explicit type. perhaps it:
const repl: Type = new REPL.REPLServer();
const repl: REPLServer = new REPL.REPLServer();

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question