docs: resolve many twoslash errors (#30573)

This commit is contained in:
ikxin 2025-01-14 17:34:02 +08:00 committed by GitHub
parent 18c85e5039
commit 2693dc2914
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -174,6 +174,7 @@ Under the hood, `mountSuspended` wraps `mount` from `@vue/test-utils`, so you ca
For example:
```ts twoslash
// @noErrors
import { it, expect } from 'vitest'
import type { Component } from 'vue'
declare module '#components' {
@ -194,6 +195,7 @@ it('can mount some component', async () => {
```
```ts twoslash
// @noErrors
import { it, expect } from 'vitest'
// ---cut---
// tests/components/SomeComponents.nuxt.spec.ts
@ -225,6 +227,7 @@ The passed in component will be rendered inside a `<div id="test-wrapper"></div>
Examples:
```ts twoslash
// @noErrors
import { it, expect } from 'vitest'
import type { Component } from 'vue'
declare module '#components' {
@ -243,6 +246,7 @@ it('can render some component', async () => {
```
```ts twoslash
// @noErrors
import { it, expect } from 'vitest'
// ---cut---
// tests/App.nuxt.spec.ts