import MagicString, { SourceMap } 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' export interface BindingMetadata { [key: string]: 'data' | 'props' | 'setup' | 'ctx' } export interface SFCScriptCompileOptions { parserPlugins?: ParserPlugin[] } let hasWarned = false /** * Compile `