mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-07 08:17:05 +00:00
[@babel/plugin-transform-runtime] Add types (#43617)
This commit is contained in:
@@ -0,0 +1,95 @@
|
||||
/* tslint:disable:no-consecutive-blank-lines comment-format */
|
||||
|
||||
import { Options } from '@babel/plugin-transform-runtime';
|
||||
|
||||
|
||||
//========//
|
||||
// COREJS //
|
||||
//========//
|
||||
|
||||
let options: Options = {
|
||||
corejs: 2,
|
||||
};
|
||||
|
||||
options = {
|
||||
corejs: 3,
|
||||
};
|
||||
|
||||
options = {
|
||||
corejs: {
|
||||
version: 2,
|
||||
proposals: true,
|
||||
},
|
||||
};
|
||||
|
||||
options = {
|
||||
corejs: {
|
||||
version: 3,
|
||||
proposals: false,
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
//=========//
|
||||
// HELPERS //
|
||||
//=========//
|
||||
|
||||
options = {
|
||||
helpers: true,
|
||||
};
|
||||
|
||||
options = {
|
||||
helpers: false,
|
||||
};
|
||||
|
||||
|
||||
//=============//
|
||||
// REGENERATOR //
|
||||
//=============//
|
||||
|
||||
options = {
|
||||
regenerator: true,
|
||||
};
|
||||
|
||||
options = {
|
||||
regenerator: false,
|
||||
};
|
||||
|
||||
|
||||
//================//
|
||||
// USE ES MODULES //
|
||||
//================//
|
||||
|
||||
options = {
|
||||
useESModules: true,
|
||||
};
|
||||
|
||||
options = {
|
||||
useESModules: false,
|
||||
};
|
||||
|
||||
|
||||
//==================//
|
||||
// ABSOLUTE RUNTIME //
|
||||
//==================//
|
||||
|
||||
options = {
|
||||
absoluteRuntime: true,
|
||||
};
|
||||
|
||||
options = {
|
||||
absoluteRuntime: false,
|
||||
};
|
||||
|
||||
options = {
|
||||
absoluteRuntime: '/some/path/here',
|
||||
};
|
||||
|
||||
|
||||
//=========//
|
||||
// VERSION //
|
||||
//=========//
|
||||
|
||||
options = {
|
||||
version: '^1.2.3',
|
||||
};
|
||||
@@ -0,0 +1,21 @@
|
||||
// Type definitions for @babel/plugin-transform-runtime 7.9
|
||||
// Project: https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-runtime, https://babeljs.io/docs/en/babel-plugin-transform-runtime
|
||||
// Definitions by: Slava Fomin II <https://github.com/slavafomin>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export interface Options {
|
||||
corejs?: CorejsOption;
|
||||
helpers?: boolean;
|
||||
regenerator?: boolean;
|
||||
useESModules?: boolean;
|
||||
absoluteRuntime?: (boolean | string);
|
||||
version?: string;
|
||||
}
|
||||
|
||||
export type CorejsOption = (
|
||||
| CorejsVersion
|
||||
| { version: CorejsVersion, proposals: boolean }
|
||||
| false
|
||||
);
|
||||
|
||||
export type CorejsVersion = (2 | 3);
|
||||
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"strict": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"paths": {
|
||||
"@babel/plugin-transform-runtime": [
|
||||
"babel__plugin-transform-runtime"
|
||||
]
|
||||
}
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"babel__plugin-transform-runtime-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"extends": "dtslint/dt.json"
|
||||
}
|
||||
Reference in New Issue
Block a user