mirror of
https://github.com/chenasraf/DefinitelyTyped.git
synced 2026-05-18 01:49:01 +00:00
🤖 Merge PR #65557 feat(rollup-plugin-natives): add type definitions by @mkermani144
This commit is contained in:
19
types/rollup-plugin-natives/index.d.ts
vendored
Normal file
19
types/rollup-plugin-natives/index.d.ts
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
// Type definitions for rollup-plugin-natives 0.7
|
||||
// Project: https://github.com/danielgindi/rollup-plugin-natives
|
||||
// Definitions by: Mohammad Kermani <https://github.com/mkermani144>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
import { Plugin } from 'rollup';
|
||||
|
||||
interface RollupPluginNativesOptions {
|
||||
copyTo?: string;
|
||||
destDir?: string;
|
||||
dlopen?: boolean;
|
||||
map?: (modulePath: string) => string | { name: string; copyTo: string };
|
||||
targetEsm?: boolean;
|
||||
sourcemap?: boolean;
|
||||
}
|
||||
|
||||
declare function nativePlugin(options: RollupPluginNativesOptions): Plugin;
|
||||
|
||||
export = nativePlugin;
|
||||
6
types/rollup-plugin-natives/package.json
Normal file
6
types/rollup-plugin-natives/package.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"rollup": "^3.22.0"
|
||||
}
|
||||
}
|
||||
13
types/rollup-plugin-natives/rollup-plugin-natives-tests.ts
Normal file
13
types/rollup-plugin-natives/rollup-plugin-natives-tests.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import nativePlugin = require('rollup-plugin-natives');
|
||||
|
||||
nativePlugin({}); // $ExpectType Plugin
|
||||
|
||||
// $ExpectType Plugin
|
||||
nativePlugin({
|
||||
copyTo: './',
|
||||
destDir: './dist',
|
||||
dlopen: true,
|
||||
map: () => '',
|
||||
sourcemap: true,
|
||||
targetEsm: true,
|
||||
});
|
||||
23
types/rollup-plugin-natives/tsconfig.json
Normal file
23
types/rollup-plugin-natives/tsconfig.json
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictFunctionTypes": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"rollup-plugin-natives-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/rollup-plugin-natives/tslint.json
Normal file
1
types/rollup-plugin-natives/tslint.json
Normal file
@@ -0,0 +1 @@
|
||||
{ "extends": "@definitelytyped/dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user