Skip to content

TypeScript

alex [dot] kramer [at] g_m_a_i_l [dot] com edited this page Apr 29, 2022 · 7 revisions

Importing untyped JS packages

See https://localhost.adobe.com:31338/templates/bfebc6a4-6d25-42ba-a52a-3eb070c98c5f

Possible solutions:

  1. Try running npm i @types/my-untyped-module to see if someone has added type declarations to DefinitelyTyped
  2. Create (or add to) a declarations.d.ts file with the line declare module "my-untyped-module" and make sure the file is in one of the directories in tsconfig.json's "include": [...].

Clone this wiki locally