@vue/compiler-core-canary
Advanced tools
Comparing version 3.20230327.0 to 3.20230403.0
import { ParserPlugin } from '@babel/parser'; | ||
import { RawSourceMap, SourceMapGenerator } from 'source-map'; | ||
import { Node as Node$1, Identifier, Function, BlockStatement as BlockStatement$1, Program, ObjectProperty } from '@babel/types'; | ||
import { Node as Node$1, Identifier, Function, BlockStatement as BlockStatement$1, Program, ObjectProperty, ImportSpecifier, ImportDefaultSpecifier, ImportNamespaceSpecifier, CallExpression as CallExpression$1 } from '@babel/types'; | ||
export { generateCodeFrame } from '@vue/shared'; | ||
export type OptionalOptions = 'whitespace' | 'isNativeTag' | 'isBuiltInComponent' | keyof CompilerCompatOptions; | ||
export type MergedParserOptions = Omit<Required<ParserOptions>, OptionalOptions> & Pick<ParserOptions, OptionalOptions>; | ||
declare const enum TextModes { | ||
type OptionalOptions = 'whitespace' | 'isNativeTag' | 'isBuiltInComponent' | keyof CompilerCompatOptions; | ||
type MergedParserOptions = Omit<Required<ParserOptions>, OptionalOptions> & Pick<ParserOptions, OptionalOptions>; | ||
export declare const enum TextModes { | ||
DATA = 0, | ||
@@ -15,3 +15,3 @@ RCDATA = 1, | ||
} | ||
export interface ParserContext { | ||
interface ParserContext { | ||
options: MergedParserOptions; | ||
@@ -27,11 +27,11 @@ readonly originalSource: string; | ||
} | ||
declare function baseParse(content: string, options?: ParserOptions): RootNode; | ||
export declare function baseParse(content: string, options?: ParserOptions): RootNode; | ||
export type CompilerCompatConfig = Partial<Record<CompilerDeprecationTypes, boolean | 'suppress-warning'>> & { | ||
type CompilerCompatConfig = Partial<Record<CompilerDeprecationTypes, boolean | 'suppress-warning'>> & { | ||
MODE?: 2 | 3; | ||
}; | ||
export interface CompilerCompatOptions { | ||
interface CompilerCompatOptions { | ||
compatConfig?: CompilerCompatConfig; | ||
} | ||
declare const enum CompilerDeprecationTypes { | ||
export declare const enum CompilerDeprecationTypes { | ||
COMPILER_IS_ON_ELEMENT = "COMPILER_IS_ON_ELEMENT", | ||
@@ -47,8 +47,8 @@ COMPILER_V_BIND_SYNC = "COMPILER_V_BIND_SYNC", | ||
} | ||
declare function checkCompatEnabled(key: CompilerDeprecationTypes, context: ParserContext | TransformContext, loc: SourceLocation | null, ...args: any[]): boolean; | ||
declare function warnDeprecation(key: CompilerDeprecationTypes, context: ParserContext | TransformContext, loc: SourceLocation | null, ...args: any[]): void; | ||
export declare function checkCompatEnabled(key: CompilerDeprecationTypes, context: ParserContext | TransformContext, loc: SourceLocation | null, ...args: any[]): boolean; | ||
export declare function warnDeprecation(key: CompilerDeprecationTypes, context: ParserContext | TransformContext, loc: SourceLocation | null, ...args: any[]): void; | ||
export type NodeTransform = (node: RootNode | TemplateChildNode, context: TransformContext) => void | (() => void) | (() => void)[]; | ||
export type DirectiveTransform = (dir: DirectiveNode, node: ElementNode, context: TransformContext, augmentor?: (ret: DirectiveTransformResult) => DirectiveTransformResult) => DirectiveTransformResult; | ||
export interface DirectiveTransformResult { | ||
interface DirectiveTransformResult { | ||
props: Property[]; | ||
@@ -59,3 +59,3 @@ needRuntime?: boolean | symbol; | ||
export type StructuralDirectiveTransform = (node: ElementNode, dir: DirectiveNode, context: TransformContext) => void | (() => void); | ||
export interface ImportItem { | ||
interface ImportItem { | ||
exp: string | ExpressionNode; | ||
@@ -100,9 +100,9 @@ path: string; | ||
} | ||
declare function createTransformContext(root: RootNode, { filename, prefixIdentifiers, hoistStatic, cacheHandlers, nodeTransforms, directiveTransforms, transformHoist, isBuiltInComponent, isCustomElement, expressionPlugins, scopeId, slotted, ssr, inSSR, ssrCssVars, bindingMetadata, inline, isTS, onError, onWarn, compatConfig }: TransformOptions): TransformContext; | ||
declare function transform(root: RootNode, options: TransformOptions): void; | ||
declare function traverseNode(node: RootNode | TemplateChildNode, context: TransformContext): void; | ||
declare function createStructuralDirectiveTransform(name: string | RegExp, fn: StructuralDirectiveTransform): NodeTransform; | ||
export declare function createTransformContext(root: RootNode, { filename, prefixIdentifiers, hoistStatic, cacheHandlers, nodeTransforms, directiveTransforms, transformHoist, isBuiltInComponent, isCustomElement, expressionPlugins, scopeId, slotted, ssr, inSSR, ssrCssVars, bindingMetadata, inline, isTS, onError, onWarn, compatConfig }: TransformOptions): TransformContext; | ||
export declare function transform(root: RootNode, options: TransformOptions): void; | ||
export declare function traverseNode(node: RootNode | TemplateChildNode, context: TransformContext): void; | ||
export declare function createStructuralDirectiveTransform(name: string | RegExp, fn: StructuralDirectiveTransform): NodeTransform; | ||
declare function processFor(node: ElementNode, dir: DirectiveNode, context: TransformContext, processCodegen?: (forNode: ForNode) => (() => void) | undefined): (() => void) | undefined; | ||
export interface ForParseResult { | ||
export declare function processFor(node: ElementNode, dir: DirectiveNode, context: TransformContext, processCodegen?: (forNode: ForNode) => (() => void) | undefined): (() => void) | undefined; | ||
interface ForParseResult { | ||
source: ExpressionNode; | ||
@@ -113,50 +113,50 @@ value: ExpressionNode | undefined; | ||
} | ||
declare function createForLoopParams({ value, key, index }: ForParseResult, memoArgs?: ExpressionNode[]): ExpressionNode[]; | ||
export declare function createForLoopParams({ value, key, index }: ForParseResult, memoArgs?: ExpressionNode[]): ExpressionNode[]; | ||
declare const FRAGMENT: unique symbol; | ||
declare const TELEPORT: unique symbol; | ||
declare const SUSPENSE: unique symbol; | ||
declare const KEEP_ALIVE: unique symbol; | ||
declare const BASE_TRANSITION: unique symbol; | ||
declare const OPEN_BLOCK: unique symbol; | ||
declare const CREATE_BLOCK: unique symbol; | ||
declare const CREATE_ELEMENT_BLOCK: unique symbol; | ||
declare const CREATE_VNODE: unique symbol; | ||
declare const CREATE_ELEMENT_VNODE: unique symbol; | ||
declare const CREATE_COMMENT: unique symbol; | ||
declare const CREATE_TEXT: unique symbol; | ||
declare const CREATE_STATIC: unique symbol; | ||
declare const RESOLVE_COMPONENT: unique symbol; | ||
declare const RESOLVE_DYNAMIC_COMPONENT: unique symbol; | ||
declare const RESOLVE_DIRECTIVE: unique symbol; | ||
declare const RESOLVE_FILTER: unique symbol; | ||
declare const WITH_DIRECTIVES: unique symbol; | ||
declare const RENDER_LIST: unique symbol; | ||
declare const RENDER_SLOT: unique symbol; | ||
declare const CREATE_SLOTS: unique symbol; | ||
declare const TO_DISPLAY_STRING: unique symbol; | ||
declare const MERGE_PROPS: unique symbol; | ||
declare const NORMALIZE_CLASS: unique symbol; | ||
declare const NORMALIZE_STYLE: unique symbol; | ||
declare const NORMALIZE_PROPS: unique symbol; | ||
declare const GUARD_REACTIVE_PROPS: unique symbol; | ||
declare const TO_HANDLERS: unique symbol; | ||
declare const CAMELIZE: unique symbol; | ||
declare const CAPITALIZE: unique symbol; | ||
declare const TO_HANDLER_KEY: unique symbol; | ||
declare const SET_BLOCK_TRACKING: unique symbol; | ||
declare const PUSH_SCOPE_ID: unique symbol; | ||
declare const POP_SCOPE_ID: unique symbol; | ||
declare const WITH_CTX: unique symbol; | ||
declare const UNREF: unique symbol; | ||
declare const IS_REF: unique symbol; | ||
declare const WITH_MEMO: unique symbol; | ||
declare const IS_MEMO_SAME: unique symbol; | ||
declare const helperNameMap: Record<symbol, string>; | ||
declare function registerRuntimeHelpers(helpers: Record<symbol, string>): void; | ||
export declare const FRAGMENT: unique symbol; | ||
export declare const TELEPORT: unique symbol; | ||
export declare const SUSPENSE: unique symbol; | ||
export declare const KEEP_ALIVE: unique symbol; | ||
export declare const BASE_TRANSITION: unique symbol; | ||
export declare const OPEN_BLOCK: unique symbol; | ||
export declare const CREATE_BLOCK: unique symbol; | ||
export declare const CREATE_ELEMENT_BLOCK: unique symbol; | ||
export declare const CREATE_VNODE: unique symbol; | ||
export declare const CREATE_ELEMENT_VNODE: unique symbol; | ||
export declare const CREATE_COMMENT: unique symbol; | ||
export declare const CREATE_TEXT: unique symbol; | ||
export declare const CREATE_STATIC: unique symbol; | ||
export declare const RESOLVE_COMPONENT: unique symbol; | ||
export declare const RESOLVE_DYNAMIC_COMPONENT: unique symbol; | ||
export declare const RESOLVE_DIRECTIVE: unique symbol; | ||
export declare const RESOLVE_FILTER: unique symbol; | ||
export declare const WITH_DIRECTIVES: unique symbol; | ||
export declare const RENDER_LIST: unique symbol; | ||
export declare const RENDER_SLOT: unique symbol; | ||
export declare const CREATE_SLOTS: unique symbol; | ||
export declare const TO_DISPLAY_STRING: unique symbol; | ||
export declare const MERGE_PROPS: unique symbol; | ||
export declare const NORMALIZE_CLASS: unique symbol; | ||
export declare const NORMALIZE_STYLE: unique symbol; | ||
export declare const NORMALIZE_PROPS: unique symbol; | ||
export declare const GUARD_REACTIVE_PROPS: unique symbol; | ||
export declare const TO_HANDLERS: unique symbol; | ||
export declare const CAMELIZE: unique symbol; | ||
export declare const CAPITALIZE: unique symbol; | ||
export declare const TO_HANDLER_KEY: unique symbol; | ||
export declare const SET_BLOCK_TRACKING: unique symbol; | ||
export declare const PUSH_SCOPE_ID: unique symbol; | ||
export declare const POP_SCOPE_ID: unique symbol; | ||
export declare const WITH_CTX: unique symbol; | ||
export declare const UNREF: unique symbol; | ||
export declare const IS_REF: unique symbol; | ||
export declare const WITH_MEMO: unique symbol; | ||
export declare const IS_MEMO_SAME: unique symbol; | ||
export declare const helperNameMap: Record<symbol, string>; | ||
export declare function registerRuntimeHelpers(helpers: Record<symbol, string>): void; | ||
declare const transformElement: NodeTransform; | ||
declare function resolveComponentType(node: ComponentNode, context: TransformContext, ssr?: boolean): string | symbol | CallExpression; | ||
export declare const transformElement: NodeTransform; | ||
export declare function resolveComponentType(node: ComponentNode, context: TransformContext, ssr?: boolean): string | symbol | CallExpression; | ||
export type PropsExpression = ObjectExpression | CallExpression | ExpressionNode; | ||
declare function buildProps(node: ElementNode, context: TransformContext, props: (DirectiveNode | AttributeNode)[] | undefined, isComponent: boolean, isDynamicComponent: boolean, ssr?: boolean): { | ||
export declare function buildProps(node: ElementNode, context: TransformContext, props: (DirectiveNode | AttributeNode)[] | undefined, isComponent: boolean, isDynamicComponent: boolean, ssr?: boolean): { | ||
props: PropsExpression | undefined; | ||
@@ -168,9 +168,9 @@ directives: DirectiveNode[]; | ||
}; | ||
declare function buildDirectiveArgs(dir: DirectiveNode, context: TransformContext): ArrayExpression; | ||
export declare function buildDirectiveArgs(dir: DirectiveNode, context: TransformContext): ArrayExpression; | ||
export type Namespace = number; | ||
declare const enum Namespaces { | ||
export declare const enum Namespaces { | ||
HTML = 0 | ||
} | ||
declare const enum NodeTypes { | ||
export declare const enum NodeTypes { | ||
ROOT = 0, | ||
@@ -204,3 +204,3 @@ ELEMENT = 1, | ||
} | ||
declare const enum ElementTypes { | ||
export declare const enum ElementTypes { | ||
ELEMENT = 0, | ||
@@ -300,3 +300,3 @@ COMPONENT = 1, | ||
*/ | ||
declare const enum ConstantTypes { | ||
export declare const enum ConstantTypes { | ||
NOT_CONSTANT = 0, | ||
@@ -431,3 +431,3 @@ CAN_SKIP_PATCH = 1, | ||
} | ||
export interface MemoFactory extends FunctionExpression { | ||
interface MemoFactory extends FunctionExpression { | ||
returns: BlockCodegenNode; | ||
@@ -532,25 +532,25 @@ } | ||
} | ||
declare const locStub: SourceLocation; | ||
declare function createRoot(children: TemplateChildNode[], loc?: SourceLocation): RootNode; | ||
declare function createVNodeCall(context: TransformContext | null, tag: VNodeCall['tag'], props?: VNodeCall['props'], children?: VNodeCall['children'], patchFlag?: VNodeCall['patchFlag'], dynamicProps?: VNodeCall['dynamicProps'], directives?: VNodeCall['directives'], isBlock?: VNodeCall['isBlock'], disableTracking?: VNodeCall['disableTracking'], isComponent?: VNodeCall['isComponent'], loc?: SourceLocation): VNodeCall; | ||
declare function createArrayExpression(elements: ArrayExpression['elements'], loc?: SourceLocation): ArrayExpression; | ||
declare function createObjectExpression(properties: ObjectExpression['properties'], loc?: SourceLocation): ObjectExpression; | ||
declare function createObjectProperty(key: Property['key'] | string, value: Property['value']): Property; | ||
declare function createSimpleExpression(content: SimpleExpressionNode['content'], isStatic?: SimpleExpressionNode['isStatic'], loc?: SourceLocation, constType?: ConstantTypes): SimpleExpressionNode; | ||
declare function createInterpolation(content: InterpolationNode['content'] | string, loc: SourceLocation): InterpolationNode; | ||
declare function createCompoundExpression(children: CompoundExpressionNode['children'], loc?: SourceLocation): CompoundExpressionNode; | ||
export type InferCodegenNodeType<T> = T extends typeof RENDER_SLOT ? RenderSlotCall : CallExpression; | ||
declare function createCallExpression<T extends CallExpression['callee']>(callee: T, args?: CallExpression['arguments'], loc?: SourceLocation): InferCodegenNodeType<T>; | ||
declare function createFunctionExpression(params: FunctionExpression['params'], returns?: FunctionExpression['returns'], newline?: boolean, isSlot?: boolean, loc?: SourceLocation): FunctionExpression; | ||
declare function createConditionalExpression(test: ConditionalExpression['test'], consequent: ConditionalExpression['consequent'], alternate: ConditionalExpression['alternate'], newline?: boolean): ConditionalExpression; | ||
declare function createCacheExpression(index: number, value: JSChildNode, isVNode?: boolean): CacheExpression; | ||
declare function createBlockStatement(body: BlockStatement['body']): BlockStatement; | ||
declare function createTemplateLiteral(elements: TemplateLiteral['elements']): TemplateLiteral; | ||
declare function createIfStatement(test: IfStatement['test'], consequent: IfStatement['consequent'], alternate?: IfStatement['alternate']): IfStatement; | ||
declare function createAssignmentExpression(left: AssignmentExpression['left'], right: AssignmentExpression['right']): AssignmentExpression; | ||
declare function createSequenceExpression(expressions: SequenceExpression['expressions']): SequenceExpression; | ||
declare function createReturnStatement(returns: ReturnStatement['returns']): ReturnStatement; | ||
declare function getVNodeHelper(ssr: boolean, isComponent: boolean): typeof CREATE_VNODE | typeof CREATE_ELEMENT_VNODE; | ||
declare function getVNodeBlockHelper(ssr: boolean, isComponent: boolean): typeof CREATE_BLOCK | typeof CREATE_ELEMENT_BLOCK; | ||
declare function convertToBlock(node: VNodeCall, { helper, removeHelper, inSSR }: TransformContext): void; | ||
export declare const locStub: SourceLocation; | ||
export declare function createRoot(children: TemplateChildNode[], loc?: SourceLocation): RootNode; | ||
export declare function createVNodeCall(context: TransformContext | null, tag: VNodeCall['tag'], props?: VNodeCall['props'], children?: VNodeCall['children'], patchFlag?: VNodeCall['patchFlag'], dynamicProps?: VNodeCall['dynamicProps'], directives?: VNodeCall['directives'], isBlock?: VNodeCall['isBlock'], disableTracking?: VNodeCall['disableTracking'], isComponent?: VNodeCall['isComponent'], loc?: SourceLocation): VNodeCall; | ||
export declare function createArrayExpression(elements: ArrayExpression['elements'], loc?: SourceLocation): ArrayExpression; | ||
export declare function createObjectExpression(properties: ObjectExpression['properties'], loc?: SourceLocation): ObjectExpression; | ||
export declare function createObjectProperty(key: Property['key'] | string, value: Property['value']): Property; | ||
export declare function createSimpleExpression(content: SimpleExpressionNode['content'], isStatic?: SimpleExpressionNode['isStatic'], loc?: SourceLocation, constType?: ConstantTypes): SimpleExpressionNode; | ||
export declare function createInterpolation(content: InterpolationNode['content'] | string, loc: SourceLocation): InterpolationNode; | ||
export declare function createCompoundExpression(children: CompoundExpressionNode['children'], loc?: SourceLocation): CompoundExpressionNode; | ||
type InferCodegenNodeType<T> = T extends typeof RENDER_SLOT ? RenderSlotCall : CallExpression; | ||
export declare function createCallExpression<T extends CallExpression['callee']>(callee: T, args?: CallExpression['arguments'], loc?: SourceLocation): InferCodegenNodeType<T>; | ||
export declare function createFunctionExpression(params: FunctionExpression['params'], returns?: FunctionExpression['returns'], newline?: boolean, isSlot?: boolean, loc?: SourceLocation): FunctionExpression; | ||
export declare function createConditionalExpression(test: ConditionalExpression['test'], consequent: ConditionalExpression['consequent'], alternate: ConditionalExpression['alternate'], newline?: boolean): ConditionalExpression; | ||
export declare function createCacheExpression(index: number, value: JSChildNode, isVNode?: boolean): CacheExpression; | ||
export declare function createBlockStatement(body: BlockStatement['body']): BlockStatement; | ||
export declare function createTemplateLiteral(elements: TemplateLiteral['elements']): TemplateLiteral; | ||
export declare function createIfStatement(test: IfStatement['test'], consequent: IfStatement['consequent'], alternate?: IfStatement['alternate']): IfStatement; | ||
export declare function createAssignmentExpression(left: AssignmentExpression['left'], right: AssignmentExpression['right']): AssignmentExpression; | ||
export declare function createSequenceExpression(expressions: SequenceExpression['expressions']): SequenceExpression; | ||
export declare function createReturnStatement(returns: ReturnStatement['returns']): ReturnStatement; | ||
export declare function getVNodeHelper(ssr: boolean, isComponent: boolean): typeof CREATE_VNODE | typeof CREATE_ELEMENT_VNODE; | ||
export declare function getVNodeBlockHelper(ssr: boolean, isComponent: boolean): typeof CREATE_BLOCK | typeof CREATE_ELEMENT_BLOCK; | ||
export declare function convertToBlock(node: VNodeCall, { helper, removeHelper, inSSR }: TransformContext): void; | ||
@@ -564,7 +564,7 @@ export interface CompilerError extends SyntaxError { | ||
} | ||
export type InferCompilerError<T> = T extends ErrorCodes ? CoreCompilerError : CompilerError; | ||
declare function createCompilerError<T extends number>(code: T, loc?: SourceLocation, messages?: { | ||
type InferCompilerError<T> = T extends ErrorCodes ? CoreCompilerError : CompilerError; | ||
export declare function createCompilerError<T extends number>(code: T, loc?: SourceLocation, messages?: { | ||
[code: number]: string; | ||
}, additionalMessage?: string): InferCompilerError<T>; | ||
declare const enum ErrorCodes { | ||
export declare const enum ErrorCodes { | ||
ABRUPT_CLOSING_OF_EMPTY_COMMENT = 0, | ||
@@ -624,3 +624,3 @@ CDATA_IN_HTML_CONTENT = 1, | ||
export interface ErrorHandlingOptions { | ||
interface ErrorHandlingOptions { | ||
onWarn?: (warning: CompilerError) => void; | ||
@@ -677,3 +677,3 @@ onError?: (error: CompilerError) => void; | ||
export type HoistTransform = (children: TemplateChildNode[], context: TransformContext, parent: ParentNode) => void; | ||
declare const enum BindingTypes { | ||
export declare const enum BindingTypes { | ||
/** | ||
@@ -717,3 +717,7 @@ * returned from data() | ||
*/ | ||
OPTIONS = "options" | ||
OPTIONS = "options", | ||
/** | ||
* a literal constant, e.g. 'foo', 1, true | ||
*/ | ||
LITERAL_CONST = "literal-const" | ||
} | ||
@@ -726,3 +730,3 @@ export type BindingMetadata = { | ||
}; | ||
export interface SharedTransformCodegenOptions { | ||
interface SharedTransformCodegenOptions { | ||
/** | ||
@@ -899,3 +903,3 @@ * Transform expressions like {{ foo }} to `_ctx.foo`. | ||
export type CodegenNode = TemplateChildNode | JSChildNode | SSRCodegenNode; | ||
type CodegenNode = TemplateChildNode | JSChildNode | SSRCodegenNode; | ||
export interface CodegenResult { | ||
@@ -922,3 +926,3 @@ code: string; | ||
} | ||
declare function generate(ast: RootNode, options?: CodegenOptions & { | ||
export declare function generate(ast: RootNode, options?: CodegenOptions & { | ||
onContextCreated?: (context: CodegenContext) => void; | ||
@@ -931,9 +935,9 @@ }): CodegenResult; | ||
]; | ||
declare function getBaseTransformPreset(prefixIdentifiers?: boolean): TransformPreset; | ||
declare function baseCompile(template: string | RootNode, options?: CompilerOptions): CodegenResult; | ||
export declare function getBaseTransformPreset(prefixIdentifiers?: boolean): TransformPreset; | ||
export declare function baseCompile(template: string | RootNode, options?: CompilerOptions): CodegenResult; | ||
declare const isStaticExp: (p: JSChildNode) => p is SimpleExpressionNode; | ||
declare const isBuiltInType: (tag: string, expected: string) => boolean; | ||
declare function isCoreComponent(tag: string): symbol | void; | ||
declare const isSimpleIdentifier: (name: string) => boolean; | ||
export declare const isStaticExp: (p: JSChildNode) => p is SimpleExpressionNode; | ||
export declare const isBuiltInType: (tag: string, expected: string) => boolean; | ||
export declare function isCoreComponent(tag: string): symbol | void; | ||
export declare const isSimpleIdentifier: (name: string) => boolean; | ||
/** | ||
@@ -945,50 +949,54 @@ * Simple lexer to check if an expression is a member expression. This is | ||
*/ | ||
declare const isMemberExpressionBrowser: (path: string) => boolean; | ||
declare const isMemberExpressionNode: (path: string, context: TransformContext) => boolean; | ||
declare const isMemberExpression: (path: string, context: TransformContext) => boolean; | ||
declare function getInnerRange(loc: SourceLocation, offset: number, length: number): SourceLocation; | ||
declare function advancePositionWithClone(pos: Position, source: string, numberOfCharacters?: number): Position; | ||
declare function advancePositionWithMutation(pos: Position, source: string, numberOfCharacters?: number): Position; | ||
declare function assert(condition: boolean, msg?: string): void; | ||
declare function findDir(node: ElementNode, name: string | RegExp, allowEmpty?: boolean): DirectiveNode | undefined; | ||
declare function findProp(node: ElementNode, name: string, dynamicOnly?: boolean, allowEmpty?: boolean): ElementNode['props'][0] | undefined; | ||
declare function isStaticArgOf(arg: DirectiveNode['arg'], name: string): boolean; | ||
declare function hasDynamicKeyVBind(node: ElementNode): boolean; | ||
declare function isText(node: TemplateChildNode): node is TextNode | InterpolationNode; | ||
declare function isVSlot(p: ElementNode['props'][0]): p is DirectiveNode; | ||
declare function isTemplateNode(node: RootNode | TemplateChildNode): node is TemplateNode; | ||
declare function isSlotOutlet(node: RootNode | TemplateChildNode): node is SlotOutletNode; | ||
declare function injectProp(node: VNodeCall | RenderSlotCall, prop: Property, context: TransformContext): void; | ||
declare function toValidAssetId(name: string, type: 'component' | 'directive' | 'filter'): string; | ||
declare function hasScopeRef(node: TemplateChildNode | IfBranchNode | ExpressionNode | undefined, ids: TransformContext['identifiers']): boolean; | ||
declare function getMemoedVNodeCall(node: BlockCodegenNode | MemoExpression): VNodeCall | RenderSlotCall; | ||
export declare const isMemberExpressionBrowser: (path: string) => boolean; | ||
export declare const isMemberExpressionNode: (path: string, context: TransformContext) => boolean; | ||
export declare const isMemberExpression: (path: string, context: TransformContext) => boolean; | ||
export declare function getInnerRange(loc: SourceLocation, offset: number, length: number): SourceLocation; | ||
export declare function advancePositionWithClone(pos: Position, source: string, numberOfCharacters?: number): Position; | ||
export declare function advancePositionWithMutation(pos: Position, source: string, numberOfCharacters?: number): Position; | ||
export declare function assert(condition: boolean, msg?: string): void; | ||
export declare function findDir(node: ElementNode, name: string | RegExp, allowEmpty?: boolean): DirectiveNode | undefined; | ||
export declare function findProp(node: ElementNode, name: string, dynamicOnly?: boolean, allowEmpty?: boolean): ElementNode['props'][0] | undefined; | ||
export declare function isStaticArgOf(arg: DirectiveNode['arg'], name: string): boolean; | ||
export declare function hasDynamicKeyVBind(node: ElementNode): boolean; | ||
export declare function isText(node: TemplateChildNode): node is TextNode | InterpolationNode; | ||
export declare function isVSlot(p: ElementNode['props'][0]): p is DirectiveNode; | ||
export declare function isTemplateNode(node: RootNode | TemplateChildNode): node is TemplateNode; | ||
export declare function isSlotOutlet(node: RootNode | TemplateChildNode): node is SlotOutletNode; | ||
export declare function injectProp(node: VNodeCall | RenderSlotCall, prop: Property, context: TransformContext): void; | ||
export declare function toValidAssetId(name: string, type: 'component' | 'directive' | 'filter'): string; | ||
export declare function hasScopeRef(node: TemplateChildNode | IfBranchNode | ExpressionNode | undefined, ids: TransformContext['identifiers']): boolean; | ||
export declare function getMemoedVNodeCall(node: BlockCodegenNode | MemoExpression): VNodeCall | RenderSlotCall; | ||
declare function walkIdentifiers(root: Node$1, onIdentifier: (node: Identifier, parent: Node$1, parentStack: Node$1[], isReference: boolean, isLocal: boolean) => void, includeAll?: boolean, parentStack?: Node$1[], knownIds?: Record<string, number>): void; | ||
declare function isReferencedIdentifier(id: Identifier, parent: Node$1 | null, parentStack: Node$1[]): boolean; | ||
declare function isInDestructureAssignment(parent: Node$1, parentStack: Node$1[]): boolean; | ||
declare function walkFunctionParams(node: Function, onIdent: (id: Identifier) => void): void; | ||
declare function walkBlockDeclarations(block: BlockStatement$1 | Program, onIdent: (node: Identifier) => void): void; | ||
declare function extractIdentifiers(param: Node$1, nodes?: Identifier[]): Identifier[]; | ||
declare const isFunctionType: (node: Node$1) => node is Function; | ||
declare const isStaticProperty: (node: Node$1) => node is ObjectProperty; | ||
declare const isStaticPropertyKey: (node: Node$1, parent: Node$1) => boolean; | ||
export declare function walkIdentifiers(root: Node$1, onIdentifier: (node: Identifier, parent: Node$1, parentStack: Node$1[], isReference: boolean, isLocal: boolean) => void, includeAll?: boolean, parentStack?: Node$1[], knownIds?: Record<string, number>): void; | ||
export declare function isReferencedIdentifier(id: Identifier, parent: Node$1 | null, parentStack: Node$1[]): boolean; | ||
export declare function isInDestructureAssignment(parent: Node$1, parentStack: Node$1[]): boolean; | ||
export declare function walkFunctionParams(node: Function, onIdent: (id: Identifier) => void): void; | ||
export declare function walkBlockDeclarations(block: BlockStatement$1 | Program, onIdent: (node: Identifier) => void): void; | ||
export declare function extractIdentifiers(param: Node$1, nodes?: Identifier[]): Identifier[]; | ||
export declare const isFunctionType: (node: Node$1) => node is Function; | ||
export declare const isStaticProperty: (node: Node$1) => node is ObjectProperty; | ||
export declare const isStaticPropertyKey: (node: Node$1, parent: Node$1) => boolean; | ||
export declare function getImportedName(specifier: ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier): string; | ||
export declare const TS_NODE_TYPES: string[]; | ||
export declare function unwrapTSNode(node: Node$1): Node$1; | ||
export declare function isCallOf(node: Node$1 | null | undefined, test: string | ((id: string) => boolean) | null | undefined): node is CallExpression$1; | ||
declare const transformModel: DirectiveTransform; | ||
export declare const transformModel: DirectiveTransform; | ||
declare const transformOn: DirectiveTransform; | ||
export declare const transformOn: DirectiveTransform; | ||
declare const transformBind: DirectiveTransform; | ||
export declare const transformBind: DirectiveTransform; | ||
declare const noopDirectiveTransform: DirectiveTransform; | ||
export declare const noopDirectiveTransform: DirectiveTransform; | ||
declare function processIf(node: ElementNode, dir: DirectiveNode, context: TransformContext, processCodegen?: (node: IfNode, branch: IfBranchNode, isRoot: boolean) => (() => void) | undefined): (() => void) | undefined; | ||
export declare function processIf(node: ElementNode, dir: DirectiveNode, context: TransformContext, processCodegen?: (node: IfNode, branch: IfBranchNode, isRoot: boolean) => (() => void) | undefined): (() => void) | undefined; | ||
declare const transformExpression: NodeTransform; | ||
declare function processExpression(node: SimpleExpressionNode, context: TransformContext, asParams?: boolean, asRawStatements?: boolean, localVars?: Record<string, number>): ExpressionNode; | ||
declare function stringifyExpression(exp: ExpressionNode | string): string; | ||
export declare const transformExpression: NodeTransform; | ||
export declare function processExpression(node: SimpleExpressionNode, context: TransformContext, asParams?: boolean, asRawStatements?: boolean, localVars?: Record<string, number>): ExpressionNode; | ||
export declare function stringifyExpression(exp: ExpressionNode | string): string; | ||
declare const trackSlotScopes: NodeTransform; | ||
declare const trackVForSlotScopes: NodeTransform; | ||
export declare const trackSlotScopes: NodeTransform; | ||
export declare const trackVForSlotScopes: NodeTransform; | ||
export type SlotFnBuilder = (slotProps: ExpressionNode | undefined, slotChildren: TemplateChildNode[], loc: SourceLocation) => FunctionExpression; | ||
declare function buildSlots(node: ElementNode, context: TransformContext, buildSlotFn?: SlotFnBuilder): { | ||
export declare function buildSlots(node: ElementNode, context: TransformContext, buildSlotFn?: SlotFnBuilder): { | ||
slots: SlotsExpression; | ||
@@ -998,10 +1006,9 @@ hasDynamicSlots: boolean; | ||
export interface SlotOutletProcessResult { | ||
interface SlotOutletProcessResult { | ||
slotName: string | ExpressionNode; | ||
slotProps: PropsExpression | undefined; | ||
} | ||
declare function processSlotOutlet(node: SlotOutletNode, context: TransformContext): SlotOutletProcessResult; | ||
export declare function processSlotOutlet(node: SlotOutletNode, context: TransformContext): SlotOutletProcessResult; | ||
declare function getConstantType(node: TemplateChildNode | SimpleExpressionNode, context: TransformContext): ConstantTypes; | ||
export declare function getConstantType(node: TemplateChildNode | SimpleExpressionNode, context: TransformContext): ConstantTypes; | ||
export { BASE_TRANSITION, BindingTypes, CAMELIZE, CAPITALIZE, CREATE_BLOCK, CREATE_COMMENT, CREATE_ELEMENT_BLOCK, CREATE_ELEMENT_VNODE, CREATE_SLOTS, CREATE_STATIC, CREATE_TEXT, CREATE_VNODE, CompilerDeprecationTypes, ConstantTypes, ElementTypes, ErrorCodes, FRAGMENT, GUARD_REACTIVE_PROPS, IS_MEMO_SAME, IS_REF, KEEP_ALIVE, MERGE_PROPS, NORMALIZE_CLASS, NORMALIZE_PROPS, NORMALIZE_STYLE, Namespaces, NodeTypes, OPEN_BLOCK, POP_SCOPE_ID, PUSH_SCOPE_ID, RENDER_LIST, RENDER_SLOT, RESOLVE_COMPONENT, RESOLVE_DIRECTIVE, RESOLVE_DYNAMIC_COMPONENT, RESOLVE_FILTER, SET_BLOCK_TRACKING, SUSPENSE, TELEPORT, TO_DISPLAY_STRING, TO_HANDLERS, TO_HANDLER_KEY, TextModes, UNREF, WITH_CTX, WITH_DIRECTIVES, WITH_MEMO, advancePositionWithClone, advancePositionWithMutation, assert, baseCompile, baseParse, buildDirectiveArgs, buildProps, buildSlots, checkCompatEnabled, convertToBlock, createArrayExpression, createAssignmentExpression, createBlockStatement, createCacheExpression, createCallExpression, createCompilerError, createCompoundExpression, createConditionalExpression, createForLoopParams, createFunctionExpression, createIfStatement, createInterpolation, createObjectExpression, createObjectProperty, createReturnStatement, createRoot, createSequenceExpression, createSimpleExpression, createStructuralDirectiveTransform, createTemplateLiteral, createTransformContext, createVNodeCall, extractIdentifiers, findDir, findProp, generate, getBaseTransformPreset, getConstantType, getInnerRange, getMemoedVNodeCall, getVNodeBlockHelper, getVNodeHelper, hasDynamicKeyVBind, hasScopeRef, helperNameMap, injectProp, isBuiltInType, isCoreComponent, isFunctionType, isInDestructureAssignment, isMemberExpression, isMemberExpressionBrowser, isMemberExpressionNode, isReferencedIdentifier, isSimpleIdentifier, isSlotOutlet, isStaticArgOf, isStaticExp, isStaticProperty, isStaticPropertyKey, isTemplateNode, isText, isVSlot, locStub, noopDirectiveTransform, processExpression, processFor, processIf, processSlotOutlet, registerRuntimeHelpers, resolveComponentType, stringifyExpression, toValidAssetId, trackSlotScopes, trackVForSlotScopes, transform, transformBind, transformElement, transformExpression, transformModel, transformOn, traverseNode, walkBlockDeclarations, walkFunctionParams, walkIdentifiers, warnDeprecation }; |
{ | ||
"name": "@vue/compiler-core-canary", | ||
"version": "3.20230327.0", | ||
"version": "3.20230403.0", | ||
"description": "@vue/compiler-core", | ||
@@ -35,4 +35,4 @@ "main": "index.js", | ||
"dependencies": { | ||
"@vue/shared": "npm:@vue/shared-canary@3.20230327.0", | ||
"@babel/parser": "^7.20.15", | ||
"@babel/parser": "^7.21.3", | ||
"@vue/shared": "npm:@vue/shared-canary@3.20230403.0", | ||
"estree-walker": "^2.0.2", | ||
@@ -42,4 +42,4 @@ "source-map": "^0.6.1" | ||
"devDependencies": { | ||
"@babel/types": "^7.16.0" | ||
"@babel/types": "^7.21.3" | ||
} | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
510076
16464
+ Added@vue/shared-canary@3.20230403.0(transitive)
- Removed@vue/shared-canary@3.20230327.0(transitive)
Updated@babel/parser@^7.21.3