mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-16 23:10:29 +00:00
Merge pull request #32368 from eoin-obrien/rollup-plugin-sourcemaps
[rollup-plugin-sourcemaps] Add types
This commit is contained in:
+19
@@ -0,0 +1,19 @@
|
||||
// Type definitions for rollup-plugin-sourcemaps 0.4
|
||||
// Project: https://github.com/maxdavidson/rollup-plugin-sourcemaps#readme
|
||||
// Definitions by: Eoin O'Brien <https://github.com/eoin-obrien>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
/// <reference types="node" />
|
||||
import { Plugin } from 'rollup';
|
||||
|
||||
export type ReadFileCallback = (err: NodeJS.ErrnoException, data: string) => void;
|
||||
export type ReadFileFunction = (file: string | Buffer | number, encoding: string, callback: ReadFileCallback) => void;
|
||||
|
||||
export interface Options {
|
||||
include?: Array<string | RegExp> | string | RegExp | null;
|
||||
exclude?: Array<string | RegExp> | string | RegExp | null;
|
||||
readFile?: ReadFileFunction;
|
||||
}
|
||||
|
||||
export default function sourcemaps(options?: Options): Plugin;
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"rollup": "^0.63.4"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
import sourcemaps from 'rollup-plugin-sourcemaps';
|
||||
import * as fs from 'fs';
|
||||
|
||||
// $ExpectType Plugin
|
||||
sourcemaps();
|
||||
|
||||
// $ExpectType Plugin
|
||||
sourcemaps({});
|
||||
|
||||
// $ExpectType Plugin
|
||||
sourcemaps({
|
||||
include: 'node_modules/**',
|
||||
exclude: [ 'node_modules/foo/**', 'node_modules/bar/**' ],
|
||||
readFile: fs.readFile
|
||||
});
|
||||
@@ -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-sourcemaps-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user