import MagicString from 'magic-string' import { BindingMetadata } from '@vue/compiler-core' import { SFCDescriptor, SFCScriptBlock } from './parse' import { parse as _parse, ParserOptions, ParserPlugin } from '@babel/parser' import { babelParserDefaultPlugins, generateCodeFrame } from '@vue/shared' import { Node, Declaration, ObjectPattern, ObjectExpression, ArrayPattern, Identifier, ExpressionStatement, ArrowFunctionExpression, ExportSpecifier, Function as FunctionNode, TSType, TSTypeLiteral, TSFunctionType, TSDeclareFunction, ObjectProperty, ArrayExpression, Statement, Expression, LabeledStatement } from '@babel/types' import { walk } from 'estree-walker' import { RawSourceMap } from 'source-map' import { genCssVarsCode, injectCssVarsCalls } from './genCssVars' export interface SFCScriptCompileOptions { /** * https://babeljs.io/docs/en/babel-parser#plugins */ babelParserPlugins?: ParserPlugin[] refSugar?: boolean } let hasWarned = false /** * Compile `