Skip to content

Commit

Permalink
docs: update
Browse files Browse the repository at this point in the history
  • Loading branch information
yuyinws committed Sep 14, 2024
1 parent 452e4fe commit b6708da
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 10 deletions.
2 changes: 1 addition & 1 deletion docs/features/pass-logs.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ On the server side, replace `console` with `client`.

Here's an example in `Nuxt`:

```ts{2,9-11} [server/api/test.ts] twoslash
```ts{1,8-10} [server/api/test.ts] twoslash
import { client } from 'unplugin-turbo-console/helper'
import { defineEventHandler } from 'h3'
Expand Down
2 changes: 1 addition & 1 deletion docs/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ This experimental syntax requires enabling the parser plugin: "importAttributes"

To resolve this, add the missing Babel parser plugin to `babelParserPlugins`:

```js{2,7} twoslash
```js{2,7} twoslash [vite.config.ts]
import { defineConfig } from 'vite'
import TurboConsole from 'unplugin-turbo-console/vite'
Expand Down
3 changes: 1 addition & 2 deletions docs/zh-CN/features/pass-logs.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ mount(() => <StartClient />, document.getElementById('app')!)

以下是在`Nuxt`中的示例:

```ts{2,9-11} twoslash
// server/api/test.ts
```ts{1,8-10} [server/api/test.ts] twoslash
import { client } from 'unplugin-turbo-console/helper'
import { defineEventHandler } from 'h3'
Expand Down
8 changes: 3 additions & 5 deletions docs/zh-CN/guide/configurations.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@

有两种方式来配置 TypeScript 类型:

1.`tsconfig.json` 文件中:

```json
```json [tsconfig.json]
{
"compilerOptions": {
"types": [
Expand All @@ -30,8 +28,8 @@
}
```

2.`.d.ts` 文件中:
或者

```ts
```ts [*.d.ts]
/// <reference types="unplugin-turbo-console/client" />
```
2 changes: 1 addition & 1 deletion docs/zh-CN/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ This experimental syntax requires enabling the parser plugin: "importAttributes"

解决方法是将缺失的 babel parser 插件添加到`babelParserPlugins`中:

```js{2,7} twoslash
```js{2,7} twoslash [vite.config.ts]
import { defineConfig } from 'vite'
import TurboConsole from 'unplugin-turbo-console/vite'
Expand Down

0 comments on commit b6708da

Please sign in to comment.