types(compiler-sfc): type annotation tweaks + move @babel/types to devDeps
This commit is contained in:
@@ -98,7 +98,7 @@ export interface SFCScriptCompileOptions {
|
||||
/**
|
||||
* Compile the template and inline the resulting render function
|
||||
* directly inside setup().
|
||||
* - Only affects <script setup>
|
||||
* - Only affects `<script setup>`
|
||||
* - This should only be used in production because it prevents the template
|
||||
* from being hot-reloaded separately from component state.
|
||||
*/
|
||||
|
||||
@@ -30,7 +30,7 @@ export interface SFCStyleCompileOptions {
|
||||
postcssOptions?: any
|
||||
postcssPlugins?: any[]
|
||||
/**
|
||||
* @deprecated
|
||||
* @deprecated use `inMap` instead.
|
||||
*/
|
||||
map?: RawSourceMap
|
||||
}
|
||||
|
||||
@@ -9,7 +9,6 @@ import {
|
||||
import * as CompilerDOM from '@vue/compiler-dom'
|
||||
import { RawSourceMap, SourceMapGenerator } from 'source-map'
|
||||
import { TemplateCompiler } from './compileTemplate'
|
||||
import { Statement } from '@babel/types'
|
||||
import { parseCssVars } from './cssVars'
|
||||
import { createCache } from './cache'
|
||||
|
||||
@@ -41,8 +40,14 @@ export interface SFCScriptBlock extends SFCBlock {
|
||||
type: 'script'
|
||||
setup?: string | boolean
|
||||
bindings?: BindingMetadata
|
||||
scriptAst?: Statement[]
|
||||
scriptSetupAst?: Statement[]
|
||||
/**
|
||||
* import('\@babel/types').Statement
|
||||
*/
|
||||
scriptAst?: any[]
|
||||
/**
|
||||
* import('\@babel/types').Statement
|
||||
*/
|
||||
scriptSetupAst?: any[]
|
||||
}
|
||||
export interface SFCStyleBlock extends SFCBlock {
|
||||
type: 'style'
|
||||
|
||||
Reference in New Issue
Block a user