oki-azure/TypeScript-Crash-Course
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
to compile .ts files to .js use
npx tsc {fileName}
Using non-typed NPM packages in TypeScript
Using untyped NPM packages with TypeScript is not type-safe because types are missing.
To help TypeScript developers use such packages, there is a community-maintained project called Definitely Typed.
Definitely Typed is a project that provides a central repository of TypeScript definitions for NPM packages which do not have types.
Example
npm install --save-dev @types/jquery
Usually, no other steps are needed after installing the declaration package.
TypeScript will automatically pick up the types when you use the package.