@types/babylon
Type definitions for babylon v6.7 from https://www.github.com/DefinitelyTyped/DefinitelyTyped
Last updated 10 years ago by types .
MIT · Original npm · Tarball · package.json
$ cnpm install @types/babylon 
SYNC missed versions from official npm registry.

Installation

npm install --save @types/babylon

Summary

This package contains type definitions for babylon (https://github.com/babel/babylon).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/babylon.

index.d.ts

import { Expression, File } from "babel-types";

export function parse(code: string, opts?: BabylonOptions): File;

export function parseExpression(input: string, options?: BabylonOptions): Expression;

export interface BabylonOptions {
    /**
     * By default, import and export declarations can only appear at a program's top level.
     * Setting this option to true allows them anywhere where a statement is allowed.
     */
    allowImportExportEverywhere?: boolean | undefined;

    /**
     * By default, a return statement at the top level raises an error. Set this to true to accept such code.
     */
    allowReturnOutsideFunction?: boolean | undefined;

    allowSuperOutsideMethod?: boolean | undefined;

    /**
     * Indicate the mode the code should be parsed in. Can be either "script" or "module".
     */
    sourceType?: "script" | "module" | undefined;

    /**
     * Correlate output AST nodes with their source filename. Useful when
     * generating code and source maps from the ASTs of multiple input files.
     */
    sourceFilename?: string | undefined;

    /**
     * Array containing the plugins that you want to enable.
     */
    plugins?: PluginName[] | undefined;
}

export type PluginName =
    | "estree"
    | "jsx"
    | "flow"
    | "typescript"
    | "classConstructorCall"
    | "doExpressions"
    | "objectRestSpread"
    | "decorators"
    | "classProperties"
    | "exportExtensions"
    | "asyncGenerators"
    | "functionBind"
    | "functionSent"
    | "dynamicImport";

Additional Details

Credits

These definitions were written by Troy Gerwien, and Marvin Hagemeister.

Current Tags

  • 6.16.9                                ...           latest (2 years ago)
  • 6.16.1                                ...           ts2.0 (9 years ago)
  • 6.16.1                                ...           ts2.1 (9 years ago)
  • 6.16.1                                ...           ts2.2 (9 years ago)
  • 6.16.2                                ...           ts2.3 (9 years ago)
  • 6.16.2                                ...           ts2.4 (9 years ago)
  • 6.16.2                                ...           ts2.5 (9 years ago)
  • 6.16.2                                ...           ts2.6 (9 years ago)
  • 6.16.2                                ...           ts2.7 (9 years ago)
  • 6.16.5                                ...           ts2.8 (7 years ago)
  • 6.16.5                                ...           ts2.9 (7 years ago)
  • 6.16.5                                ...           ts3.0 (7 years ago)
  • 6.16.5                                ...           ts3.1 (7 years ago)
  • 6.16.5                                ...           ts3.2 (7 years ago)
  • 6.16.5                                ...           ts3.3 (7 years ago)
  • 6.16.5                                ...           ts3.4 (7 years ago)
  • 6.16.5                                ...           ts3.5 (7 years ago)
  • 6.16.6                                ...           ts3.6 (5 years ago)
  • 6.16.6                                ...           ts3.7 (5 years ago)
  • 6.16.6                                ...           ts3.8 (5 years ago)
  • 6.16.6                                ...           ts3.9 (5 years ago)
  • 6.16.6                                ...           ts4.0 (5 years ago)
  • 6.16.6                                ...           ts4.1 (5 years ago)
  • 6.16.6                                ...           ts4.2 (5 years ago)
  • 6.16.6                                ...           ts4.3 (5 years ago)
  • 6.16.6                                ...           ts4.4 (5 years ago)
  • 6.16.9                                ...           ts4.5 (2 years ago)
  • 6.16.9                                ...           ts4.6 (2 years ago)
  • 6.16.9                                ...           ts4.7 (2 years ago)
  • 6.16.9                                ...           ts4.8 (2 years ago)
  • 6.16.9                                ...           ts4.9 (2 years ago)
  • 6.16.9                                ...           ts5.0 (2 years ago)
  • 6.16.9                                ...           ts5.1 (2 years ago)
  • 6.16.9                                ...           ts5.2 (2 years ago)
  • 6.16.9                                ...           ts5.3 (2 years ago)
  • 6.16.9                                ...           ts5.4 (2 years ago)
  • 6.16.9                                ...           ts5.5 (2 years ago)

21 Versions

  • 6.16.9                                ...           2 years ago
  • 6.16.8                                ...           2 years ago
  • 6.16.7                                ...           3 years ago
  • 6.16.6                                ...           5 years ago
  • 6.16.5                                ...           7 years ago
  • 6.16.4                                ...           7 years ago
  • 6.16.3                                ...           8 years ago
  • 6.16.2                                ...           9 years ago
  • 6.16.1                                ...           9 years ago
  • 6.16.0                                ...           9 years ago
  • 6.7.15                                ...           9 years ago
  • 6.7.14                                ...           10 years ago
  • 6.7.13                                ...           10 years ago
  • 6.7.12-alpha                                ...           10 years ago
  • 6.7.11-alpha                                ...           10 years ago
  • 6.7.10-alpha                                ...           10 years ago
  • 6.7.9-alpha                                ...           10 years ago
  • 6.7.8-alpha                                ...           10 years ago
  • 6.7.7-alpha                                ...           10 years ago
  • 6.7.2-alpha                                ...           10 years ago
  • 6.7.1-alpha                                ...           10 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 2
Last Month 2
Dependencies (1)
Dev Dependencies (0)
None

Copyright 2013 - present © cnpmjs.org | Home |