import MagicString from 'magic-string' import { SFCDescriptor, SFCScriptBlock } from './parse' import { parse, ParserPlugin } from '@babel/parser' import { babelParserDefautPlugins, generateCodeFrame } from '@vue/shared' import { Node, Declaration, ObjectPattern, ArrayPattern, Identifier, ExpressionStatement, ArrowFunctionExpression, ExportSpecifier, TSType, TSTypeLiteral, TSFunctionType, TSDeclareFunction } from '@babel/types' import { walk } from 'estree-walker' import { RawSourceMap } from 'source-map' export interface SFCScriptCompileOptions { /** * https://babeljs.io/docs/en/babel-parser#plugins */ babelParserPlugins?: ParserPlugin[] } export interface BindingMetadata { [key: string]: 'data' | 'props' | 'setup' | 'ctx' } let hasWarned = false /** * Compile `