mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
Added type for @svgr/rollup (#39007)
* added types for @types/svgr/rollup * fixed formatting * added typescript version * fixed typo * added reference type * updated typescript version * added package json
This commit is contained in:
parent
a88a306eff
commit
6ce6f59e47
22
types/svgr__rollup/index.d.ts
vendored
Normal file
22
types/svgr__rollup/index.d.ts
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
// Type definitions for @svgr/rollup 4.3
|
||||
// Project: https://github.com/smooth-code/svgr/tree/master/packages/rollup
|
||||
// Definitions by: Nick <https://github.com/fobdy>
|
||||
// Max Boguslavskiy <https://github.com/maxbogus>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 3.0
|
||||
|
||||
/// <reference types='node' />
|
||||
|
||||
import { Plugin } from 'rollup';
|
||||
|
||||
declare namespace svgrRollup {
|
||||
interface Options {
|
||||
include?: string;
|
||||
exclude: string;
|
||||
babel: boolean;
|
||||
}
|
||||
}
|
||||
|
||||
declare function svgrRollup(options?: svgrRollup.Options): Plugin;
|
||||
|
||||
export = svgrRollup;
|
||||
6
types/svgr__rollup/package.json
Normal file
6
types/svgr__rollup/package.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"rollup": "^1.23.1"
|
||||
}
|
||||
}
|
||||
10
types/svgr__rollup/svgr__rollup-tests.ts
Normal file
10
types/svgr__rollup/svgr__rollup-tests.ts
Normal file
@ -0,0 +1,10 @@
|
||||
import svgr, { Options } from '@svgr/rollup';
|
||||
|
||||
// test data
|
||||
const partialOptions: Options = { exclude: '', babel: true };
|
||||
const fullOptions: Options = { include: '', exclude: '', babel: true };
|
||||
|
||||
// tests
|
||||
svgr();
|
||||
svgr(partialOptions);
|
||||
svgr(fullOptions);
|
||||
27
types/svgr__rollup/tsconfig.json
Normal file
27
types/svgr__rollup/tsconfig.json
Normal file
@ -0,0 +1,27 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"paths": {
|
||||
"@svgr/rollup": ["svgr__rollup"]
|
||||
},
|
||||
"noEmit": true,
|
||||
"esModuleInterop": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"svgr__rollup-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/svgr__rollup/tslint.json
Normal file
1
types/svgr__rollup/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Loading…
Reference in New Issue
Block a user