json-d-ts
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

JSON d.ts

JSON definition for Typescript that allows loading .json files using import.

Usage

In order to load a .json file using Typescript, do the following:

  • Install this package
npm install --save-dev json-d-ts
  • Add to your tsconfig.json the path to the installed module:
    "typeRoots": [
      "../node_modules/json-d-ts"
    ]
  • Load your .json files easily using import statements:
import * as data from './example.json';

Package Sidebar

Install

npm i json-d-ts

Weekly Downloads

11

Version

1.0.1

License

MIT

Last publish

Collaborators

  • jeanlescure