Add types for rollup-plugin-json (#20799)

This commit is contained in:
Andy Mockler
2017-10-23 17:26:58 -05:00
committed by Sheetal Nandi
parent d37e6362bf
commit dd56067216
4 changed files with 42 additions and 0 deletions

15
types/rollup-plugin-json/index.d.ts vendored Normal file
View File

@@ -0,0 +1,15 @@
// Type definitions for rollup-plugin-json 2.3
// Project: https://github.com/rollup/rollup-plugin-json#readme
// Definitions by: Andy Mockler <https://github.com/asmockler>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
import { Plugin } from 'rollup';
export interface Options {
include?: string | string[];
exclude?: string | string[];
preferConst?: boolean;
indent?: string;
}
export default function json(options?: Options): Plugin;

View File

@@ -0,0 +1,3 @@
import json from 'rollup-plugin-json';
json(); // $ExpectType Plugin

View File

@@ -0,0 +1,23 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"rollup-plugin-json-tests.ts"
]
}

View File

@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }