UNPKG

1.95 kBMarkdownView Raw
1# Installation
2> `npm install --save @types/rollup-plugin-json`
3
4# Summary
5This package contains type definitions for rollup-plugin-json (https://github.com/rollup/rollup-plugin-json#readme).
6
7# Details
8Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/rollup-plugin-json.
9## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/rollup-plugin-json/index.d.ts)
10````ts
11// Type definitions for rollup-plugin-json 3.0
12// Project: https://github.com/rollup/rollup-plugin-json#readme
13// Definitions by: Andy Mockler <https://github.com/asmockler>
14// Martin Hochel <https://github.com/hotell>
15// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
16// TypeScript Version: 2.3
17
18/// <reference types="node" />
19import { Plugin } from 'rollup';
20
21declare namespace json {
22 interface Options {
23 /**
24 * All JSON files will be parsed by default, but you can also specifically include/exclude files
25 */
26 include?: string | string[] | undefined;
27 exclude?: string | string[] | undefined;
28 /**
29 * for tree-shaking, properties will be declared as variables, using either `var` or `const`
30 * @default false
31 */
32 preferConst?: boolean | undefined;
33 /**
34 * specify indentation for the generated default export — defaults to '\t'
35 * @default '\t'
36 */
37 indent?: string | undefined;
38 }
39}
40
41declare function json(options?: json.Options): Plugin;
42export = json;
43
44````
45
46### Additional Details
47 * Last updated: Thu, 08 Jul 2021 22:42:08 GMT
48 * Dependencies: [@types/rollup](https://npmjs.com/package/@types/rollup), [@types/node](https://npmjs.com/package/@types/node)
49 * Global values: none
50
51# Credits
52These definitions were written by [Andy Mockler](https://github.com/asmockler), and [Martin Hochel](https://github.com/hotell).
53
\No newline at end of file