progrium
progrium2y ago

TypeScript compiler type declarations

I'm using import ts from "npm:typescript" to work with the TypeScript compiler, but how do I get type information?
5 Replies
progrium
progriumOP2y ago
VSCode is telling me "Cannot find module 'npm:typescript' or its corresponding type declarations."
Fifth-Normal-Form
Typescript is Built-In to VS Code! you don't need to import it! If you truly want to use Typescript rather than Deno-Typescript, you'll need to add a tsconfig.json file. Read about that on the Typescript site, not VS Code site.
progrium
progriumOP2y ago
Not sure I follow. I'm using the typescript package to do my own AST parsing of TS code for static analysis. But the package seemingly has no API docs, so autocomplete would be reaaaallly nice, but I'm not getting anything from the above import
Fifth-Normal-Form
My misunderstanding. I'm not familiar with npm:typescript -- sorry!
progrium
progriumOP2y ago
thanks tho! ugh, deno just wasn't enabled for the workspace

Did you find this page helpful?