nexfep 0.5.2 → 0.5.3

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.
Files changed (3) hide show
  1. package/README-CN.md +12 -0
  2. package/README.md +12 -0
  3. package/package.json +2 -1
package/README-CN.md CHANGED
@@ -240,6 +240,18 @@ window.setSize(800, 600);
240
240
  window.openDevTools();
241
241
  ```
242
242
 
243
+ ### 页面 API 的 Typescript 定义
244
+
245
+ 在前端的 `tsconfig.json` 中添加以下内容即可在前端页面中使用 `nexfep` 定义的 API 类型:
246
+
247
+ ```json
248
+ {
249
+ "compilerOptions": {
250
+ "types": ["nexfep/frontend"]
251
+ }
252
+ }
253
+ ```
254
+
243
255
  ### 自定义事件
244
256
 
245
257
  #### 触发事件
package/README.md CHANGED
@@ -238,6 +238,18 @@ window.setSize(800, 600);
238
238
  window.openDevTools();
239
239
  ```
240
240
 
241
+ ### TypeScript Definitions for Frontend API
242
+
243
+ Add the following content to your frontend's `tsconfig.json` to use the frontend API definitions:
244
+
245
+ ```json
246
+ {
247
+ "compilerOptions": {
248
+ "types": ["nexfep/frontend"]
249
+ }
250
+ }
251
+ ```
252
+
241
253
  ### Custom Events
242
254
 
243
255
  #### Invoke Events
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nexfep",
3
- "version": "0.5.2",
3
+ "version": "0.5.3",
4
4
  "description": "A desktop application framework based on @webviewjs/webview",
5
5
  "keywords": [
6
6
  "@webviewjs/webview",
@@ -22,6 +22,7 @@
22
22
  },
23
23
  "typesVersions": {
24
24
  "*": {
25
+ ".": ["./index.d.ts"],
25
26
  "frontend": ["./frontend/index.d.ts"]
26
27
  }
27
28
  },