Skip to content

Commit fb37556

Browse files
committed
update api docs
1 parent 1653c2c commit fb37556

File tree

1 file changed

+28
-2
lines changed

1 file changed

+28
-2
lines changed

api.md

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Annoate the Vue SFC block
2828

2929
**Signature:**
3030
```typescript
31-
declare function annotate(source: string, filepath: string, options?: AnnotateOptions): string;
31+
declare function annotate(source: string, filepath: string, options?: AnnotateOptions): Promise<string>;
3232
```
3333

3434
#### Parameters
@@ -74,7 +74,7 @@ Format the Vue SFC block
7474

7575
**Signature:**
7676
```typescript
77-
declare function format(source: string, filepath: string, options?: FormatOptions): string;
77+
declare function format(source: string, filepath: string, options?: FormatOptions): Promise<string>;
7878
```
7979

8080
#### Parameters
@@ -162,6 +162,19 @@ Only `i18n` type is supported, if you don't specify it. If any other type is spe
162162

163163
default as `i18n`
164164

165+
##### vue
166+
167+
The Vue template compiler version
168+
169+
**Signature:**
170+
```typescript
171+
vue?: number;
172+
```
173+
174+
#### Remarks
175+
176+
The version of the Vue template to be parsed by the annotate function. If `2` is specified, the `vue-template-compiler` used by Vue 2 is used; if `3` is specified, the `@vue/compiler-sfc` used by Vue 3 is used. defalt as `3`
177+
165178

166179
### CompileOptions
167180

@@ -236,6 +249,19 @@ prettier?: Options;
236249

237250
The options for formatting the content of `i18n` custom blocks with prettier default as [DEFAULT_PRETTIER_OPTIONS](#default_prettier_options)
238251

252+
##### vue
253+
254+
The Vue template compiler version
255+
256+
**Signature:**
257+
```typescript
258+
vue?: number;
259+
```
260+
261+
#### Remarks
262+
263+
The version of the Vue template to be parsed by the annotate function. If `2` is specified, the `vue-template-compiler` used by Vue 2 is used; if `3` is specified, the `@vue/compiler-sfc` used by Vue 3 is used. defalt as `3`
264+
239265

240266
### SFCParseError
241267

0 commit comments

Comments
 (0)