wip: compiler deprecation config
This commit is contained in:
@@ -6,9 +6,17 @@ import {
|
||||
DirectiveTransform,
|
||||
TransformContext
|
||||
} from './transform'
|
||||
import { CompilerCompatOptions } from './compat/compatConfig'
|
||||
import { ParserPlugin } from '@babel/parser'
|
||||
|
||||
export interface ParserOptions {
|
||||
export interface ErrorHandlingOptions {
|
||||
onWarn?: (msg: string | CompilerError) => void
|
||||
onError?: (error: CompilerError) => void
|
||||
}
|
||||
|
||||
export interface ParserOptions
|
||||
extends ErrorHandlingOptions,
|
||||
CompilerCompatOptions {
|
||||
/**
|
||||
* e.g. platform native elements, e.g. `<div>` for browsers
|
||||
*/
|
||||
@@ -48,7 +56,6 @@ export interface ParserOptions {
|
||||
* Only needed for DOM compilers
|
||||
*/
|
||||
decodeEntities?: (rawText: string, asAttr: boolean) => string
|
||||
onError?: (error: CompilerError) => void
|
||||
/**
|
||||
* Keep comments in the templates AST, even in production
|
||||
*/
|
||||
@@ -138,7 +145,10 @@ interface SharedTransformCodegenOptions {
|
||||
filename?: string
|
||||
}
|
||||
|
||||
export interface TransformOptions extends SharedTransformCodegenOptions {
|
||||
export interface TransformOptions
|
||||
extends SharedTransformCodegenOptions,
|
||||
ErrorHandlingOptions,
|
||||
CompilerCompatOptions {
|
||||
/**
|
||||
* An array of node transforms to be applied to every AST node.
|
||||
*/
|
||||
@@ -213,7 +223,6 @@ export interface TransformOptions extends SharedTransformCodegenOptions {
|
||||
* needed to render inline CSS variables on component root
|
||||
*/
|
||||
ssrCssVars?: string
|
||||
onError?: (error: CompilerError) => void
|
||||
}
|
||||
|
||||
export interface CodegenOptions extends SharedTransformCodegenOptions {
|
||||
|
||||
Reference in New Issue
Block a user