Debian Codegraph @

types-babel-standalone/index.d.ts

raw symbols ◀ ▶
Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
1 Debian patch touch this file
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 import { TransformOptions, types, FileResultCallback, BabelFileResult } from '@babel/core';
8
9 export function transform(code: string, options: TransformOptions): BabelFileResult;
10
11 export function transformFromAst(ast: types.Node, code: string | undefined, opts: TransformOptions | undefined, callback?: FileResultCallback): void;
12
13 export function registerPlugin(name: string, plugin: object | (() => void)): void;
14
15 export function registerPlugins(newPlugins: {
16 [key: string]: object | (() => void)
17 }): void;
18
19 export function registerPreset(name: string, preset: object | (() => void)): void;
20 export function registerPresets(newPresets: {
21 [key: string]: object | (() => void),
22 }): void;
23
24 export const availablePlugins: Record<string, object | (() => void)>;
25 export const availablePresets: Record<string, object | (() => void)>;
26
27 export function transformScriptTags(scriptTags?: HTMLCollection): void;
28
29 export function disableScriptTags(): void;
30
31 export as namespace babel;