import MagicString from 'magic-string' import { BindingMetadata } from '@vue/compiler-core' import { SFCDescriptor, SFCScriptBlock } from './parse' import { parse, 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 } 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[] } let hasWarned = false /** * Compile `