progrium
progrium12mo 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
progrium12mo ago
VSCode is telling me "Cannot find module 'npm:typescript' or its corresponding type declarations."
NDH
NDH12mo ago
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
progrium12mo 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
NDH
NDH12mo ago
My misunderstanding. I'm not familiar with npm:typescript -- sorry!
progrium
progrium12mo ago
thanks tho! ugh, deno just wasn't enabled for the workspace