@babel/core

  • Version 8.1.4
  • Published
  • 174 kB
  • 17 dependencies
  • MIT license

Install

npm i @babel/core
yarn add @babel/core
pnpm add @babel/core

Overview

Babel compiler core.

Index

Variables

variable CONFIG_ITEM_BRAND

const CONFIG_ITEM_BRAND: Symbol;

    variable createConfigItem

    const createConfigItem: CreateConfigItem;

      variable createConfigItemRunner

      const createConfigItemRunner: {
      errback: (
      value:
      | string
      | ConfigItem<PresetAPI>
      | [PresetTarget<object>, object]
      | [PresetTarget<object>, object, string]
      | ConfigItem<PluginAPI>
      | [PluginTarget<object>, object]
      | [PluginTarget<object>, object, string]
      | ((api: PresetAPI, options: object, dirname: string) => PresetObject)
      | {
      default: (
      api: PresetAPI,
      options: object,
      dirname: string
      ) => PresetObject;
      }
      | ((api: PluginAPI, options: object, dirname: string) => PluginObject)
      | {
      default: (
      api: PluginAPI,
      options: object,
      dirname: string
      ) => PluginObject;
      },
      options: { dirname?: string; type?: 'preset' | 'plugin' } | undefined,
      callback: (err: any, result: ConfigItem<unknown>) => void
      ) => void;
      sync: (
      value:
      | string
      | ConfigItem<PresetAPI>
      | [PresetTarget<object>, object]
      | [PresetTarget<object>, object, string]
      | ConfigItem<PluginAPI>
      | [PluginTarget<object>, object]
      | [PluginTarget<object>, object, string]
      | ((api: PresetAPI, options: object, dirname: string) => PresetObject)
      | {
      default: (
      api: PresetAPI,
      options: object,
      dirname: string
      ) => PresetObject;
      }
      | ((api: PluginAPI, options: object, dirname: string) => PluginObject)
      | {
      default: (
      api: PluginAPI,
      options: object,
      dirname: string
      ) => PluginObject;
      },
      options?: { dirname?: string; type?: 'preset' | 'plugin' } | undefined
      ) => ConfigItem<unknown>;
      async: (
      value:
      | string
      | ConfigItem<PresetAPI>
      | ((api: PresetAPI, options: object, dirname: string) => PresetObject)
      | {
      default: (
      api: PresetAPI,
      options: object,
      dirname: string
      ) => PresetObject;
      }
      | [PresetTarget<object>, object]
      | [PresetTarget<object>, object, string]
      | ConfigItem<PluginAPI>
      | ((api: PluginAPI, options: object, dirname: string) => PluginObject)
      | {
      default: (
      api: PluginAPI,
      options: object,
      dirname: string
      ) => PluginObject;
      }
      | [PluginTarget<object>, object]
      | [PluginTarget<object>, object, string],
      options?: { dirname?: string; type?: 'preset' | 'plugin' } | undefined
      ) => Promise<ConfigItem<unknown>>;
      };

        variable DEFAULT_EXTENSIONS

        const DEFAULT_EXTENSIONS: readonly ['.js', '.jsx', '.es6', '.es', '.mjs', '.cjs'];
        • Recommended set of compilable extensions. Not used in @babel/core directly, but meant as as an easy source for tooling making use of @babel/core.

        variable knownAssumptions

        const knownAssumptions: readonly [
        'arrayLikeIsIterable',
        'constantReexports',
        'constantSuper',
        'enumerableModuleMeta',
        'ignoreFunctionLength',
        'ignoreToPrimitiveHint',
        'iterableIsArray',
        'mutableTemplateObject',
        'noClassCalls',
        'noClassPrototypeAssign',
        'noConstructorPrimitiveReturn',
        'noDocumentAll',
        'noIncompleteNsImportDetection',
        'noNewArrows',
        'noUninitializedPrivateFieldAccess',
        'noUninitializedThis',
        'objectRestNoSymbols',
        'privateFieldsAsSymbols',
        'privateFieldsAsProperties',
        'pureGetters',
        'setClassMethods',
        'setComputedProperties',
        'setPublicClassFields',
        'setSpreadProperties',
        'skipForOfIteratorClosing',
        'superIsCallableConstructor'
        ];

          variable loadOptionsRunner

          const loadOptionsRunner: {
          errback: (
          opts: InputOptions | null | undefined,
          callback: (err: any, result: ResolvedOptions | null) => void
          ) => void;
          sync: (opts: InputOptions | null | undefined) => ResolvedOptions | null;
          async: (
          opts: InputOptions | null | undefined
          ) => Promise<ResolvedOptions | null>;
          };

            variable loadPartialConfigRunner

            const loadPartialConfigRunner: {
            errback: (
            opts: InputOptions | undefined,
            callback: (err: any, result: PartialConfig | null) => void
            ) => void;
            sync: (opts?: InputOptions | undefined) => PartialConfig | null;
            async: (opts?: InputOptions | undefined) => Promise<PartialConfig | null>;
            };

              variable parse

              const parse: Parse;

                variable parseRunner

                const parseRunner: {
                errback: (
                code: string,
                opts: InputOptions | null | undefined,
                callback: (err: any, result: ParseResult | null) => void
                ) => void;
                sync: (
                code: string,
                opts: InputOptions | null | undefined
                ) => ParseResult | null;
                async: (
                code: string,
                opts: InputOptions | null | undefined
                ) => Promise<ParseResult | null>;
                };

                  variable transform

                  const transform: Transform;

                    variable transformFileRunner

                    const transformFileRunner: gensync.Gensync<
                    [filename: string, opts?: InputOptions],
                    FileResult,
                    any
                    >;

                      variable transformFromAst

                      const transformFromAst: TransformFromAst;

                        variable transformFromAstRunner

                        const transformFromAstRunner: {
                        errback: (
                        ast: AstRoot,
                        code: string,
                        opts: InputOptions | null | undefined,
                        callback: (err: any, result: FileResult | null) => void
                        ) => void;
                        sync: (
                        ast: AstRoot,
                        code: string,
                        opts: InputOptions | null | undefined
                        ) => FileResult | null;
                        async: (
                        ast: AstRoot,
                        code: string,
                        opts: InputOptions | null | undefined
                        ) => Promise<FileResult | null>;
                        };

                          variable transformRunner

                          const transformRunner: {
                          errback: (
                          code: string,
                          opts: InputOptions | null | undefined,
                          callback: (err: any, result: FileResult | null) => void
                          ) => void;
                          sync: (
                          code: string,
                          opts?: InputOptions | null | undefined
                          ) => FileResult | null;
                          async: (
                          code: string,
                          opts?: InputOptions | null | undefined
                          ) => Promise<FileResult | null>;
                          };

                            variable version

                            const version: string;

                              Functions

                              function assertVersion

                              assertVersion: (range: string | number) => void;

                                function buildExternalHelpers

                                buildExternalHelpers: (
                                allowlist?: string[],
                                outputType?: 'global' | 'module' | 'umd' | 'var'
                                ) => string;

                                  function createConfigItem$1

                                  createConfigItem$1: <API>(
                                  value: PluginItem | PresetItem,
                                  options?: { dirname?: string; type?: 'preset' | 'plugin' }
                                  ) => Handler<ConfigItem<API>>;
                                  • Create a config item using the same value format used in Babel's config files. Items returned from this function should be cached by the caller ideally, as recreating the config item will mean re-resolving the item and re-evaluating the plugin/preset function.

                                  function createConfigItemAsync

                                  createConfigItemAsync: (
                                  value:
                                  | string
                                  | ConfigItem<PresetAPI>
                                  | ((api: PresetAPI, options: object, dirname: string) => PresetObject)
                                  | {
                                  default: (
                                  api: PresetAPI,
                                  options: object,
                                  dirname: string
                                  ) => PresetObject;
                                  }
                                  | [PresetTarget<object>, object]
                                  | [PresetTarget<object>, object, string]
                                  | ConfigItem<PluginAPI>
                                  | ((
                                  api: PluginAPI,
                                  options: object,
                                  dirname: string
                                  ) => PluginObject<PluginPass<object>>)
                                  | {
                                  default: (
                                  api: PluginAPI,
                                  options: object,
                                  dirname: string
                                  ) => PluginObject<PluginPass<object>>;
                                  }
                                  | [PluginTarget<object>, object]
                                  | [PluginTarget<object>, object, string],
                                  options?: { dirname?: string; type?: 'preset' | 'plugin' }
                                  ) => Promise<ConfigItem<unknown>>;

                                    function createConfigItemSync

                                    createConfigItemSync: (
                                    value:
                                    | string
                                    | ConfigItem<PresetAPI>
                                    | [PresetTarget<object>, object]
                                    | [PresetTarget<object>, object, string]
                                    | ConfigItem<PluginAPI>
                                    | [PluginTarget<object>, object]
                                    | [PluginTarget<object>, object, string]
                                    | ((api: PresetAPI, options: object, dirname: string) => PresetObject)
                                    | {
                                    default: (
                                    api: PresetAPI,
                                    options: object,
                                    dirname: string
                                    ) => PresetObject;
                                    }
                                    | ((
                                    api: PluginAPI,
                                    options: object,
                                    dirname: string
                                    ) => PluginObject<PluginPass<object>>)
                                    | {
                                    default: (
                                    api: PluginAPI,
                                    options: object,
                                    dirname: string
                                    ) => PluginObject<PluginPass<object>>;
                                    },
                                    options?: { dirname?: string; type?: 'preset' | 'plugin' }
                                    ) => ConfigItem<unknown>;

                                      function getEnv

                                      getEnv: (defaultValue?: string) => string;

                                        function loadOptions

                                        loadOptions: (
                                        opts: Parameters<typeof loadOptionsImpl>[0],
                                        callback?: (err: Error, val: ResolvedOptions | null) => void
                                        ) => void;

                                          function loadOptionsAsync

                                          loadOptionsAsync: (opts: InputOptions) => Promise<ResolvedOptions | null>;

                                            function loadOptionsImpl

                                            loadOptionsImpl: (
                                            opts: InputOptions | null | undefined
                                            ) => Handler<ResolvedOptions>;

                                              function loadOptionsSync

                                              loadOptionsSync: (opts: InputOptions) => ResolvedOptions | null;

                                                function loadPartialConfig

                                                loadPartialConfig: (
                                                opts: Parameters<typeof loadPartialConfig$1>[0],
                                                callback?: (err: Error, val: PartialConfig | null) => void
                                                ) => void;

                                                  function loadPartialConfig$1

                                                  loadPartialConfig$1: (opts?: InputOptions) => Handler<PartialConfig>;

                                                    function loadPartialConfigAsync

                                                    loadPartialConfigAsync: (opts?: InputOptions) => Promise<PartialConfig | null>;

                                                      function loadPartialConfigSync

                                                      loadPartialConfigSync: (opts?: InputOptions) => PartialConfig | null;

                                                        function parseAsync

                                                        parseAsync: (code: string, opts: InputOptions) => Promise<ParseResult | null>;

                                                          function parseSync

                                                          parseSync: (code: string, opts: InputOptions) => ParseResult | null;

                                                            function resolvePlugin

                                                            resolvePlugin: (name: string, dirname: string) => string;

                                                              function resolvePreset

                                                              resolvePreset: (name: string, dirname: string) => string;

                                                                function transformAsync

                                                                transformAsync: (
                                                                code: string,
                                                                opts?: InputOptions
                                                                ) => Promise<FileResult | null>;

                                                                  function transformFile

                                                                  transformFile: {
                                                                  (filename: string, callback: FileResultCallback): void;
                                                                  (filename: string, opts: InputOptions, callback: FileResultCallback): void;
                                                                  };

                                                                    function transformFileAsync

                                                                    transformFileAsync: (
                                                                    ...args: Parameters<typeof transformFileRunner.async>
                                                                    ) => Promise<FileResult | null>;

                                                                      function transformFileSync

                                                                      transformFileSync: (
                                                                      ...args: Parameters<typeof transformFileRunner.sync>
                                                                      ) => FileResult | null;

                                                                        function transformFromAstAsync

                                                                        transformFromAstAsync: (
                                                                        ast: any,
                                                                        code: string,
                                                                        opts: InputOptions
                                                                        ) => Promise<FileResult | null>;

                                                                          function transformFromAstSync

                                                                          transformFromAstSync: (
                                                                          ast: any,
                                                                          code: string,
                                                                          opts: InputOptions
                                                                          ) => FileResult | null;

                                                                            function transformSync

                                                                            transformSync: (code: string, opts?: InputOptions) => FileResult | null;

                                                                              Classes

                                                                              class ConfigItem

                                                                              class ConfigItem<API> {}
                                                                              • A public representation of a plugin/preset that will _eventually_ be load. Users can use this to interact with the results of a loaded Babel configuration.

                                                                                Any changes to public properties of this class should be considered a breaking change to Babel's API.

                                                                              constructor

                                                                              constructor(descriptor: UnloadedDescriptor<API, object>);

                                                                                property [CONFIG_ITEM_BRAND]

                                                                                [CONFIG_ITEM_BRAND]: boolean;
                                                                                • Used to detect ConfigItem instances from other Babel instances.

                                                                                property dirname

                                                                                dirname: string;
                                                                                • The directory that the options for this item are relative to.

                                                                                property file

                                                                                file: void | { request: string; resolved: string };
                                                                                • Data about the file that the item was loaded from, if Babel knows it.

                                                                                property name

                                                                                name: string | void;
                                                                                • Get the name of the plugin, if the user gave it one.

                                                                                property options

                                                                                options: false | void | object;
                                                                                • The options, if any, that were passed to the item. Mutating this will lead to undefined behavior.

                                                                                  "false" means that this item has been disabled.

                                                                                property value

                                                                                value: object | Function;
                                                                                • The resolved value of the item itself.

                                                                                class File

                                                                                class File {}

                                                                                  constructor

                                                                                  constructor(options: ResolvedOptions, { code, ast, inputMap }: NormalizedFile);

                                                                                    property ast

                                                                                    ast: t.File;

                                                                                      property code

                                                                                      code: string;

                                                                                        property declarations

                                                                                        declarations: Record<string, t.Identifier>;

                                                                                          property hub

                                                                                          hub: any;

                                                                                            property inputMap

                                                                                            inputMap: any;

                                                                                              property metadata

                                                                                              metadata: Record<string, any>;

                                                                                                property opts

                                                                                                opts: ResolvedOptions;

                                                                                                  property path

                                                                                                  path: NodePath<t.Program>;

                                                                                                    property scope

                                                                                                    scope: Scope;

                                                                                                      property shebang

                                                                                                      shebang: string;
                                                                                                      • Provide backward-compatible access to the interpreter directive handling in Babel 6.x. If you are writing a plugin for Babel 7.x or higher, it would be best to use 'program.interpreter' directly.

                                                                                                      method addHelper

                                                                                                      addHelper: (name: string) => t.Identifier;

                                                                                                        method availableHelper

                                                                                                        availableHelper: (name: string, versionRange?: string | null) => boolean;
                                                                                                        • Check if a given helper is available in @babel/core's helper list.

                                                                                                          This _also_ allows you to pass a Babel version specifically. If the helper exists, but was not available for the full given range, it will be considered unavailable.

                                                                                                        method buildCodeFrameError

                                                                                                        buildCodeFrameError: (
                                                                                                        node: t.Node | undefined | null,
                                                                                                        msg: string,
                                                                                                        _Error?: typeof Error
                                                                                                        ) => Error;

                                                                                                          method get

                                                                                                          get: (key: unknown) => any;

                                                                                                            method has

                                                                                                            has: (key: unknown) => boolean;

                                                                                                              method set

                                                                                                              set: (key: unknown, val: unknown) => void;

                                                                                                                class PartialConfig

                                                                                                                class PartialConfig {}

                                                                                                                  constructor

                                                                                                                  constructor(
                                                                                                                  options: NormalizedOptions,
                                                                                                                  babelrc: string,
                                                                                                                  ignore: string,
                                                                                                                  config: string,
                                                                                                                  fileHandling: FileHandling,
                                                                                                                  files: Set<string>
                                                                                                                  );

                                                                                                                    property babelignore

                                                                                                                    babelignore: string;

                                                                                                                      property babelrc

                                                                                                                      babelrc: string;

                                                                                                                        property config

                                                                                                                        config: string;

                                                                                                                          property fileHandling

                                                                                                                          fileHandling: FileHandling;

                                                                                                                            property files

                                                                                                                            files: Set<string>;

                                                                                                                              property options

                                                                                                                              options: NormalizedOptions;
                                                                                                                              • These properties are public, so any changes to them should be considered a breaking change to Babel's API.

                                                                                                                              method hasFilesystemConfig

                                                                                                                              hasFilesystemConfig: () => boolean;
                                                                                                                              • Returns true if there is a config file in the filesystem for this config.

                                                                                                                              class PluginPass

                                                                                                                              class PluginPass<Options = object> {}

                                                                                                                                constructor

                                                                                                                                constructor(file: File, key: string, options: {}, isAsync: boolean);

                                                                                                                                  property cwd

                                                                                                                                  cwd: string;
                                                                                                                                  • The working directory that Babel's programmatic options are loaded relative to.

                                                                                                                                  property file

                                                                                                                                  file: File;

                                                                                                                                    property filename

                                                                                                                                    filename: string;
                                                                                                                                    • The absolute path of the file being compiled.

                                                                                                                                    property isAsync

                                                                                                                                    isAsync: boolean;
                                                                                                                                    • Is Babel executed in async mode or not.

                                                                                                                                    property key

                                                                                                                                    key: string;

                                                                                                                                      property opts

                                                                                                                                      opts: Partial<Options>;

                                                                                                                                        method addHelper

                                                                                                                                        addHelper: (name: string) => t.Identifier;

                                                                                                                                          method availableHelper

                                                                                                                                          availableHelper: (name: string, versionRange?: string | null) => boolean;

                                                                                                                                            method buildCodeFrameError

                                                                                                                                            buildCodeFrameError: (
                                                                                                                                            node: t.Node | undefined | null,
                                                                                                                                            msg: string,
                                                                                                                                            _Error?: typeof Error
                                                                                                                                            ) => Error;

                                                                                                                                              method get

                                                                                                                                              get: (key: unknown) => any;

                                                                                                                                                method set

                                                                                                                                                set: (key: unknown, val: unknown) => void;

                                                                                                                                                  Type Aliases

                                                                                                                                                  type CallerMetadata

                                                                                                                                                  type CallerMetadata = {
                                                                                                                                                  name: string;
                                                                                                                                                  supportsStaticESM?: boolean;
                                                                                                                                                  supportsDynamicImport?: boolean;
                                                                                                                                                  supportsTopLevelAwait?: boolean;
                                                                                                                                                  supportsExportNamespaceFrom?: boolean;
                                                                                                                                                  };

                                                                                                                                                    type ConfigAPI

                                                                                                                                                    type ConfigAPI = {
                                                                                                                                                    version: string;
                                                                                                                                                    cache: SimpleCacheConfigurator;
                                                                                                                                                    env: EnvFunction;
                                                                                                                                                    async: () => boolean;
                                                                                                                                                    assertVersion: typeof assertVersion;
                                                                                                                                                    caller: CallerFactory;
                                                                                                                                                    };

                                                                                                                                                      type FileResult

                                                                                                                                                      type FileResult = {
                                                                                                                                                      metadata: Record<string, any>;
                                                                                                                                                      options: Record<string, any>;
                                                                                                                                                      ast: t.File | null;
                                                                                                                                                      code: string | null;
                                                                                                                                                      map: GeneratorResult$1['map'];
                                                                                                                                                      sourceType: Exclude<SourceTypeOption, 'unambiguous'>;
                                                                                                                                                      externalDependencies: Set<string>;
                                                                                                                                                      };

                                                                                                                                                        type GeneratorOptions

                                                                                                                                                        type GeneratorOptions = _babel_generator.GeneratorOptions;

                                                                                                                                                          type GeneratorResult

                                                                                                                                                          type GeneratorResult = _babel_generator.GeneratorResult;

                                                                                                                                                            type InputOptions

                                                                                                                                                            type InputOptions = {
                                                                                                                                                            cwd?: string;
                                                                                                                                                            filename?: string;
                                                                                                                                                            filenameRelative?: string;
                                                                                                                                                            babelrc?: boolean;
                                                                                                                                                            babelrcRoots?: BabelrcSearch;
                                                                                                                                                            configFile?: ConfigFileSearch;
                                                                                                                                                            root?: string;
                                                                                                                                                            rootMode?: RootMode;
                                                                                                                                                            code?: boolean;
                                                                                                                                                            ast?: boolean;
                                                                                                                                                            cloneInputAst?: boolean;
                                                                                                                                                            inputSourceMap?: RootInputSourceMapOption;
                                                                                                                                                            envName?: string;
                                                                                                                                                            caller?: CallerMetadata;
                                                                                                                                                            extends?: string;
                                                                                                                                                            env?: EnvSet<InputOptions>;
                                                                                                                                                            ignore?: MatchItem[];
                                                                                                                                                            only?: MatchItem[];
                                                                                                                                                            overrides?: InputOptions[];
                                                                                                                                                            showIgnoredFiles?: boolean;
                                                                                                                                                            test?: ConfigApplicableTest;
                                                                                                                                                            include?: ConfigApplicableTest;
                                                                                                                                                            exclude?: ConfigApplicableTest;
                                                                                                                                                            presets?: PresetItem[];
                                                                                                                                                            plugins?: PluginItem[];
                                                                                                                                                            passPerPreset?: boolean;
                                                                                                                                                            assumptions?: Assumptions;
                                                                                                                                                            targets?: TargetsListOrObject;
                                                                                                                                                            browserslistConfigFile?: ConfigFileSearch;
                                                                                                                                                            browserslistEnv?: string;
                                                                                                                                                            retainLines?: GeneratorOptions$1['retainLines'];
                                                                                                                                                            comments?: GeneratorOptions$1['comments'];
                                                                                                                                                            shouldPrintComment?: GeneratorOptions$1['shouldPrintComment'];
                                                                                                                                                            compact?: GeneratorOptions$1['compact'];
                                                                                                                                                            minified?: GeneratorOptions$1['minified'];
                                                                                                                                                            auxiliaryCommentBefore?: GeneratorOptions$1['auxiliaryCommentBefore'];
                                                                                                                                                            auxiliaryCommentAfter?: GeneratorOptions$1['auxiliaryCommentAfter'];
                                                                                                                                                            sourceType?: SourceTypeOption;
                                                                                                                                                            wrapPluginVisitorMethod?: VisitWrapper | null;
                                                                                                                                                            highlightCode?: boolean;
                                                                                                                                                            sourceMaps?: SourceMapsOption;
                                                                                                                                                            sourceMap?: SourceMapsOption;
                                                                                                                                                            sourceFileName?: string;
                                                                                                                                                            sourceRoot?: string;
                                                                                                                                                            parserOpts?: ParserOptions;
                                                                                                                                                            generatorOpts?: GeneratorOptions$1;
                                                                                                                                                            };

                                                                                                                                                              type NormalizedOptions

                                                                                                                                                              type NormalizedOptions = Omit<InputOptions, 'presets' | 'plugins'> & {
                                                                                                                                                              assumptions: Assumptions;
                                                                                                                                                              targets: Targets;
                                                                                                                                                              cloneInputAst: boolean;
                                                                                                                                                              babelrc: false;
                                                                                                                                                              configFile: false;
                                                                                                                                                              browserslistConfigFile: false;
                                                                                                                                                              passPerPreset: false;
                                                                                                                                                              envName: string;
                                                                                                                                                              cwd: string;
                                                                                                                                                              root: string;
                                                                                                                                                              rootMode: 'root';
                                                                                                                                                              filename: string | undefined;
                                                                                                                                                              presets: ConfigItem<PresetAPI>[];
                                                                                                                                                              plugins: ConfigItem<PluginAPI>[];
                                                                                                                                                              };

                                                                                                                                                                type PluginAPI

                                                                                                                                                                type PluginAPI = PluginAPI$1 & typeof __;

                                                                                                                                                                  type PluginItem

                                                                                                                                                                  type PluginItem<Option = object> =
                                                                                                                                                                  | ConfigItem<PluginAPI>
                                                                                                                                                                  | PluginTarget<Option>
                                                                                                                                                                  | [PluginTarget<Option>, Option]
                                                                                                                                                                  | [PluginTarget<Option>, Option, string];

                                                                                                                                                                    type PluginObject

                                                                                                                                                                    type PluginObject<S extends PluginPass = PluginPass> = {
                                                                                                                                                                    name?: string;
                                                                                                                                                                    manipulateOptions?: (
                                                                                                                                                                    options: ResolvedOptions & {
                                                                                                                                                                    generatorOpts: GeneratorOptions$1;
                                                                                                                                                                    },
                                                                                                                                                                    parserOpts: ParserOptions & {
                                                                                                                                                                    plugins: NonNullable<ParserOptions['plugins']>;
                                                                                                                                                                    }
                                                                                                                                                                    ) => void;
                                                                                                                                                                    pre?: (this: S, file: File) => void | Promise<void>;
                                                                                                                                                                    post?: (this: S, file: File) => void | Promise<void>;
                                                                                                                                                                    inherits?: (api: PluginAPI, options: any, dirname: string) => PluginObject;
                                                                                                                                                                    visitor?: VisitorBase$1<S> | Omit<ExplodedVisitor<S>, 'noScope'>;
                                                                                                                                                                    parserOverride?: (
                                                                                                                                                                    ...args: [...Parameters<typeof parse$1>, typeof parse$1]
                                                                                                                                                                    ) => ReturnType<typeof parse$1>;
                                                                                                                                                                    generatorOverride?: (
                                                                                                                                                                    ast: File['ast'],
                                                                                                                                                                    generatorOpts: GeneratorOptions$1,
                                                                                                                                                                    code: File['code'],
                                                                                                                                                                    generate: typeof _babel_generator__default
                                                                                                                                                                    ) => GeneratorResult$1;
                                                                                                                                                                    };

                                                                                                                                                                      type PluginTarget

                                                                                                                                                                      type PluginTarget<Option = object> =
                                                                                                                                                                      | string
                                                                                                                                                                      | MaybeDefaultProperty<
                                                                                                                                                                      (api: PluginAPI, options: Option, dirname: string) => PluginObject
                                                                                                                                                                      >;

                                                                                                                                                                        type PresetAPI

                                                                                                                                                                        type PresetAPI = PresetAPI$1 & typeof __;

                                                                                                                                                                          type PresetItem

                                                                                                                                                                          type PresetItem<Option = object> =
                                                                                                                                                                          | ConfigItem<PresetAPI>
                                                                                                                                                                          | PresetTarget<Option>
                                                                                                                                                                          | [PresetTarget<Option>, Option]
                                                                                                                                                                          | [PresetTarget<Option>, Option, string];

                                                                                                                                                                            type PresetObject

                                                                                                                                                                            type PresetObject = {
                                                                                                                                                                            overrides?: PresetObject[];
                                                                                                                                                                            test?: ConfigApplicableTest;
                                                                                                                                                                            plugins?: PluginItem[];
                                                                                                                                                                            };

                                                                                                                                                                              type PresetTarget

                                                                                                                                                                              type PresetTarget<Option = object> =
                                                                                                                                                                              | string
                                                                                                                                                                              | MaybeDefaultProperty<
                                                                                                                                                                              (api: PresetAPI, options: Option, dirname: string) => PresetObject
                                                                                                                                                                              >;

                                                                                                                                                                                type Visitor

                                                                                                                                                                                type Visitor<S = unknown> = _babel_traverse.Visitor<S>;

                                                                                                                                                                                  type VisitorBase

                                                                                                                                                                                  type VisitorBase<S = unknown> = _babel_traverse.VisitorBase<S>;

                                                                                                                                                                                    Package Files (1)

                                                                                                                                                                                    Dependencies (17)

                                                                                                                                                                                    Dev Dependencies (12)

                                                                                                                                                                                    Peer Dependencies (0)

                                                                                                                                                                                    No peer dependencies.

                                                                                                                                                                                    Badge

                                                                                                                                                                                    To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                                                                                                                                                                    You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@babel/core.

                                                                                                                                                                                    • Markdown
                                                                                                                                                                                      [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@babel/core)
                                                                                                                                                                                    • HTML
                                                                                                                                                                                      <a href="https://www.jsdocs.io/package/@babel/core"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>