| 1 |
// Type definitions for @babel/standalone 7.1 |
| 2 |
// Project: https://github.com/babel/babel/tree/master/packages/babel-standalone |
| 3 |
// Definitions by: DefinitelyTyped <https://github.com/DefinitelyTyped> |
| 4 |
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped |
| 5 |
// Minimum TypeScript Version: 3.4 |
| 6 |
|
| •7 |
// @ts-ignore |
| 8 |
import { TransformOptions, types, FileResultCallback, BabelFileResult } from '@babel/core'; |
| 9 |
|
| 10 |
export function transform(code: string, options: TransformOptions): BabelFileResult; |
| 11 |
|
| 12 |
export function transformFromAst(ast: types.Node, code: string | undefined, opts: TransformOptions | undefined, callback?: FileResultCallback): void; |
| 13 |
|
| 14 |
export function registerPlugin(name: string, plugin: object | (() => void)): void; |
| 15 |
|
| 16 |
export function registerPlugins(newPlugins: { |
| 17 |
[key: string]: object | (() => void) |
| 18 |
}): void; |
| 19 |
|
| 20 |
export function registerPreset(name: string, preset: object | (() => void)): void; |
| 21 |
export function registerPresets(newPresets: { |
| 22 |
[key: string]: object | (() => void), |
| 23 |
}): void; |
| 24 |
|
| 25 |
export const availablePlugins: Record<string, object | (() => void)>; |
| 26 |
export const availablePresets: Record<string, object | (() => void)>; |
| 27 |
|
| 28 |
export function transformScriptTags(scriptTags?: HTMLCollection): void; |
| 29 |
|
| 30 |
export function disableScriptTags(): void; |
| 31 |
|
| 32 |
export as namespace babel; |