Sha256: 1bf553b87af33f6ae6c62523b231648b521bb6b76680f65d612ee4795b7b80d2

Contents?: true

Size: 887 Bytes

Versions: 1

Compression:

Stored size: 887 Bytes

Contents

import * as Babel from '@babel/core';
import { File } from '@babel/types';
import { ParserOptions } from '@codemod/parser';
/**
 * Fixes the `PluginObj` type from `@babel/core` by making all fields optional
 * and adding parser and generator override methods.
 */
export interface PluginObj<S = File> extends Partial<Babel.PluginObj<S>> {
    parserOverride?(code: string, options: ParserOptions, parse: (code: string, options: ParserOptions) => File): File;
    generatorOverride?(ast: File, options: Babel.GeneratorOptions, code: string, generate: (ast: File, options: Babel.GeneratorOptions) => string): {
        code: string;
        map?: object;
    };
}
export declare type RawBabelPlugin = (babel: typeof Babel) => PluginObj;
export declare type RawBabelPluginWithOptions = [RawBabelPlugin, object];
export declare type BabelPlugin = RawBabelPlugin | RawBabelPluginWithOptions;

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
wice_grid-7.1.0 node_modules/@codemod/core/build/BabelPluginTypes.d.ts