vite-plugin-dts 0.8.3 → 0.9.0
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.
- package/README.md +10 -1
- package/README.zh-CN.md +10 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +810 -34
- package/dist/index.mjs +804 -34
- package/package.json +5 -2
package/README.md
CHANGED
|
@@ -88,6 +88,10 @@ export interface PluginOptions {
|
|
|
88
88
|
// Default: false
|
|
89
89
|
noEmitOnError?: boolean
|
|
90
90
|
|
|
91
|
+
// Whether skip typescript diagnostics
|
|
92
|
+
// Default: true
|
|
93
|
+
skipDiagnostics?: boolean
|
|
94
|
+
|
|
91
95
|
// Whether log diagnostic informations
|
|
92
96
|
// Default: false
|
|
93
97
|
logDiagnostics?: boolean
|
|
@@ -95,12 +99,17 @@ export interface PluginOptions {
|
|
|
95
99
|
// After emit diagnostic hook
|
|
96
100
|
// According to the length to judge whether there is any type error
|
|
97
101
|
// Default: () => {}
|
|
98
|
-
afterDiagnostic?: (diagnostics: Diagnostic[]) => void
|
|
102
|
+
afterDiagnostic?: (diagnostics: Diagnostic[]) => void | Promise<void>
|
|
99
103
|
|
|
100
104
|
// Before declaration file be writed hook
|
|
101
105
|
// You can transform declaration file-path and content through it
|
|
102
106
|
// Default: () => {}
|
|
103
107
|
beforeWriteFile?: (filePath: string, content: string) => void | TransformWriteFile
|
|
108
|
+
|
|
109
|
+
// After build hook
|
|
110
|
+
// It wil be called after all declaration files are written
|
|
111
|
+
// Default: () => {}
|
|
112
|
+
afterBuild?: () => void | Promise<void>
|
|
104
113
|
}
|
|
105
114
|
```
|
|
106
115
|
|
package/README.zh-CN.md
CHANGED
|
@@ -88,6 +88,10 @@ export interface PluginOptions {
|
|
|
88
88
|
// 默认值: false
|
|
89
89
|
noEmitOnError?: boolean
|
|
90
90
|
|
|
91
|
+
// 是否跳过类型诊断
|
|
92
|
+
// 默认值: true
|
|
93
|
+
skipDiagnostics?: boolean
|
|
94
|
+
|
|
91
95
|
// 是否打印类型诊断信息
|
|
92
96
|
// 默认值: false
|
|
93
97
|
logDiagnostics?: boolean
|
|
@@ -95,12 +99,17 @@ export interface PluginOptions {
|
|
|
95
99
|
// 获取诊断信息后的钩子
|
|
96
100
|
// 可以根据参数 length 来判断有误类型错误
|
|
97
101
|
// 默认值: () => {}
|
|
98
|
-
afterDiagnostic?: (diagnostics: Diagnostic[]) => void
|
|
102
|
+
afterDiagnostic?: (diagnostics: Diagnostic[]) => void | Promise<void>
|
|
99
103
|
|
|
100
104
|
// 类型声明文件被写入前的钩子
|
|
101
105
|
// 可以在钩子里转换文件路径和文件内容
|
|
102
106
|
// 默认值: () => {}
|
|
103
107
|
beforeWriteFile?: (filePath: string, content: string) => void | TransformWriteFile
|
|
108
|
+
|
|
109
|
+
// 构建后回调钩子
|
|
110
|
+
// 将会在所有类型文件被写入后调用
|
|
111
|
+
// 默认值: () => {}
|
|
112
|
+
afterBuild?: () => void | Promise<void>
|
|
104
113
|
}
|
|
105
114
|
```
|
|
106
115
|
|
package/dist/index.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ interface PluginOptions {
|
|
|
18
18
|
insertTypesEntry?: boolean;
|
|
19
19
|
copyDtsFiles?: boolean;
|
|
20
20
|
noEmitOnError?: boolean;
|
|
21
|
+
skipDiagnostics?: boolean;
|
|
21
22
|
logDiagnostics?: boolean;
|
|
22
23
|
afterDiagnostic?: (diagnostics: Diagnostic[]) => void;
|
|
23
24
|
beforeWriteFile?: (filePath: string, content: string) => void | TransformWriteFile;
|