@vue/compiler-sfc 3.4.0-alpha.3 → 3.4.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -117,11 +117,6 @@ export interface SFCScriptCompileOptions {
117
117
  * @default true
118
118
  */
119
119
  hoistStatic?: boolean;
120
- /**
121
- * (**Experimental**) Enable macro `defineModel`
122
- * @default false
123
- */
124
- defineModel?: boolean;
125
120
  /**
126
121
  * (**Experimental**) Enable reactive destructure for `defineProps`
127
122
  * @default false
@@ -136,6 +131,10 @@ export interface SFCScriptCompileOptions {
136
131
  fileExists(file: string): boolean;
137
132
  readFile(file: string): string | undefined;
138
133
  };
134
+ /**
135
+ * Transform Vue SFCs into custom elements.
136
+ */
137
+ customElement?: boolean | ((filename: string) => boolean);
139
138
  }
140
139
  interface ImportBinding {
141
140
  isType: boolean;
@@ -159,6 +158,7 @@ export interface SFCParseOptions {
159
158
  pad?: boolean | 'line' | 'space';
160
159
  ignoreEmpty?: boolean;
161
160
  compiler?: TemplateCompiler;
161
+ parseExpressions?: boolean;
162
162
  }
163
163
  export interface SFCBlock {
164
164
  type: string;
@@ -221,7 +221,7 @@ export interface SFCParseResult {
221
221
  descriptor: SFCDescriptor;
222
222
  errors: (CompilerError | SyntaxError)[];
223
223
  }
224
- export declare function parse(source: string, { sourceMap, filename, sourceRoot, pad, ignoreEmpty, compiler }?: SFCParseOptions): SFCParseResult;
224
+ export declare function parse(source: string, { sourceMap, filename, sourceRoot, pad, ignoreEmpty, compiler, parseExpressions }?: SFCParseOptions): SFCParseResult;
225
225
 
226
226
  type PreprocessLang = 'less' | 'sass' | 'scss' | 'styl' | 'stylus';
227
227
 
@@ -291,7 +291,7 @@ interface ModelDecl {
291
291
  identifier: string | undefined;
292
292
  }
293
293
 
294
- declare const enum BindingTypes {
294
+ declare enum BindingTypes {
295
295
  /**
296
296
  * returned from data()
297
297
  */
@@ -348,6 +348,7 @@ export declare class ScriptCompileContext {
348
348
  options: Partial<SFCScriptCompileOptions>;
349
349
  isJS: boolean;
350
350
  isTS: boolean;
351
+ isCE: boolean;
351
352
  scriptAst: Program | null;
352
353
  scriptSetupAst: Program | null;
353
354
  source: string;
@@ -411,7 +412,7 @@ export type SimpleTypeResolveOptions = Partial<Pick<SFCScriptCompileOptions, 'gl
411
412
  * }
412
413
  * ```
413
414
  */
414
- export type SimpleTypeResolveContext = Pick<ScriptCompileContext, 'source' | 'filename' | 'error' | 'helper' | 'getString' | 'propsTypeDecl' | 'propsRuntimeDefaults' | 'propsDestructuredBindings' | 'emitsTypeDecl'> & Partial<Pick<ScriptCompileContext, 'scope' | 'globalScopes' | 'deps' | 'fs'>> & {
415
+ export type SimpleTypeResolveContext = Pick<ScriptCompileContext, 'source' | 'filename' | 'error' | 'helper' | 'getString' | 'propsTypeDecl' | 'propsRuntimeDefaults' | 'propsDestructuredBindings' | 'emitsTypeDecl' | 'isCE'> & Partial<Pick<ScriptCompileContext, 'scope' | 'globalScopes' | 'deps' | 'fs'>> & {
415
416
  ast: Statement[];
416
417
  options: SimpleTypeResolveOptions;
417
418
  };
@@ -450,7 +451,7 @@ interface ResolvedElements {
450
451
  */
451
452
  export declare function resolveTypeElements(ctx: TypeResolveContext, node: Node & MaybeWithScope & {
452
453
  _resolvedElements?: ResolvedElements;
453
- }, scope?: TypeScope): ResolvedElements;
454
+ }, scope?: TypeScope, typeParameters?: Record<string, Node>): ResolvedElements;
454
455
  /**
455
456
  * @private
456
457
  */