@babel/parser
- Version 7.28.4
- Published
- 1.98 MB
- 1 dependency
- MIT license
Install
npm i @babel/parseryarn add @babel/parserpnpm add @babel/parserOverview
A JavaScript parser
Index
Variables
Functions
Interfaces
Type Aliases
Variables
variable tokTypes
const tokTypes: { [name: string]: any };Functions
function parse
parse: (input: string, options?: ParserOptions) => ParseResult<File>;Parse the provided code as an entire ECMAScript program.
function parseExpression
parseExpression: ( input: string, options?: ParserOptions) => ParseResult<Expression>;Interfaces
interface DecoratorsPluginOptions
interface DecoratorsPluginOptions {}property allowCallParenthesized
allowCallParenthesized?: boolean;property decoratorsBeforeExport
decoratorsBeforeExport?: boolean;interface ParseError
interface ParseError {}property code
code: string;property reasonCode
reasonCode: string;interface PipelineOperatorPluginOptions
interface PipelineOperatorPluginOptions {}property proposal
proposal: BABEL_8_BREAKING extends false ? 'minimal' | 'fsharp' | 'hack' | 'smart' : 'fsharp' | 'hack';property topicToken
topicToken?: '%' | '#' | '@@' | '^^' | '^';interface RecordAndTuplePluginOptions
interface RecordAndTuplePluginOptions {}property syntaxType
syntaxType: 'bar' | 'hash';interface TypeScriptPluginOptions
interface TypeScriptPluginOptions {}property disallowAmbiguousJSXLike
disallowAmbiguousJSXLike?: boolean;property dts
dts?: boolean;Type Aliases
type FlowPluginOptions
type FlowPluginOptions = BABEL_8_BREAKING extends true ? { all?: boolean; enums?: boolean; } : { all?: boolean; };type ParseResult
type ParseResult<Result extends File | Expression = File> = Result & { errors: null | ParseError[];};type ParserOptions
type ParserOptions = Partial<Options>;type ParserPlugin
type PluginConfig = Plugin$1 | ParserPluginWithOptions;type ParserPluginWithOptions
type ParserPluginWithOptions = | ['decorators', DecoratorsPluginOptions] | ['discardBinding', { syntaxType: 'void' }] | ['estree', { classFeatures?: boolean }] | IF_BABEL_7<['importAttributes', { deprecatedAssertSyntax: boolean }]> | IF_BABEL_7<['moduleAttributes', { version: 'may-2020' }]> | ['optionalChainingAssign', { version: '2023-07' }] | ['pipelineOperator', PipelineOperatorPluginOptions] | ['recordAndTuple', RecordAndTuplePluginOptions] | ['flow', FlowPluginOptions] | ['typescript', TypeScriptPluginOptions];Package Files (1)
Dependencies (1)
Dev Dependencies (6)
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto 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/parser.
- Markdown[](https://www.jsdocs.io/package/@babel/parser)
- HTML<a href="https://www.jsdocs.io/package/@babel/parser"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 3850 ms. - Missing or incorrect documentation? Open an issue for this package.
