mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-16 21:58:19 +00:00
fix(docs): add return type to template functions
This commit is contained in:
parent
9e64b26cac
commit
daf3a8ae2d
@ -1821,7 +1821,7 @@ Renders given template using [lodash template](https://lodash.com/docs/4.17.15#t
|
||||
#### Type
|
||||
|
||||
```ts
|
||||
function addTemplate (template: NuxtTemplate | string): NuxtTemplate
|
||||
function addTemplate (template: NuxtTemplate | string): ResolvedNuxtTemplate
|
||||
|
||||
interface NuxtTemplate {
|
||||
src?: string
|
||||
@ -1831,6 +1831,17 @@ interface NuxtTemplate {
|
||||
getContents?: (data: Record<string, any>) => string | Promise<string>
|
||||
write?: boolean
|
||||
}
|
||||
|
||||
interface ResolvedNuxtTemplate {
|
||||
src: string
|
||||
filename: string
|
||||
dst: string
|
||||
options: Record<string, any>
|
||||
getContents: (data: Record<string, any>) => string | Promise<string>
|
||||
write: boolean
|
||||
filename: string
|
||||
dst: string
|
||||
}
|
||||
```
|
||||
|
||||
#### Parameters
|
||||
@ -1886,7 +1897,7 @@ Renders given template using [lodash template](https://lodash.com/docs/4.17.15#t
|
||||
#### Type
|
||||
|
||||
```ts
|
||||
function addTypeTemplate (template: NuxtTypeTemplate | string): NuxtTemplate
|
||||
function addTypeTemplate (template: NuxtTypeTemplate | string): ResolvedNuxtTemplate
|
||||
|
||||
interface NuxtTemplate {
|
||||
src?: string
|
||||
@ -1895,6 +1906,17 @@ interface NuxtTemplate {
|
||||
options?: Record<string, any>
|
||||
getContents?: (data: Record<string, any>) => string | Promise<string>
|
||||
}
|
||||
|
||||
interface ResolvedNuxtTemplate {
|
||||
src: string
|
||||
filename: string
|
||||
dst: string
|
||||
options: Record<string, any>
|
||||
getContents: (data: Record<string, any>) => string | Promise<string>
|
||||
write: boolean
|
||||
filename: string
|
||||
dst: string
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user