@nasl/types 0.2.0 → 0.2.2

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/index.d.ts CHANGED
@@ -4,3 +4,4 @@
4
4
  /// <reference path="nasl.ui.d.ts" />
5
5
  /// <reference path="nasl.ui.options.d.ts" />
6
6
  /// <reference path="nasl.ui.decorators.d.ts" />
7
+ /// <reference path="nasl.io.d.ts" />
package/nasl.io.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ /* eslint-disable @typescript-eslint/naming-convention */
1
2
  /* eslint-disable lines-between-class-members */
2
3
  declare namespace nasl.io {
3
4
  export class FileInfo {
@@ -8,5 +9,7 @@ declare namespace nasl.io {
8
9
  type: nasl.core.String;
9
10
  }
10
11
 
11
- export class File {}
12
+ export class File {
13
+ __name: 'File';
14
+ }
12
15
  }
package/nasl.ui.ast.d.ts CHANGED
@@ -413,6 +413,24 @@ export interface PropDeclaration {
413
413
  * 渲染时的设计值
414
414
  */
415
415
  tsDesignerValue?: string;
416
+ /**
417
+ * 是否隐藏
418
+ *
419
+ * 标记该功能在 IDE 面板中不展示,优先级高于 if
420
+ */
421
+ hidden?: boolean;
422
+ /**
423
+ * 废弃说明
424
+ *
425
+ * 标记该功能已废弃,可以说明被哪些新的 API 取代
426
+ */
427
+ deprecation?: string;
428
+ /**
429
+ * 是否按字面量类型检查
430
+ *
431
+ * 当属性类型为 string、boolean 或 number literal 时,为 true 则按字面量类型严格检查,默认 false 按通用基础类型处理
432
+ */
433
+ checkLiteralType?: boolean;
416
434
  /**
417
435
  * 是否显隐
418
436
  *
@@ -562,6 +580,18 @@ export interface EventDeclaration {
562
580
  * 组件事件描述
563
581
  */
564
582
  description?: string;
583
+ /**
584
+ * 是否隐藏
585
+ *
586
+ * 标记该功能在 IDE 面板中不展示
587
+ */
588
+ hidden?: boolean;
589
+ /**
590
+ * 废弃说明
591
+ *
592
+ * 标记该功能已废弃,可以说明被哪些新的 API 取代
593
+ */
594
+ deprecation?: string;
565
595
  /**
566
596
  * 类型
567
597
  *
@@ -591,6 +621,18 @@ export interface SlotDeclaration {
591
621
  * 插槽描述
592
622
  */
593
623
  description?: string;
624
+ /**
625
+ * 是否隐藏
626
+ *
627
+ * 标记该功能在 IDE 面板中不展示
628
+ */
629
+ hidden?: boolean;
630
+ /**
631
+ * 废弃说明
632
+ *
633
+ * 标记该功能已废弃,可以说明被哪些新的 API 取代
634
+ */
635
+ deprecation?: string;
594
636
  /**
595
637
  * 类型
596
638
  *
@@ -717,6 +759,18 @@ export interface LogicDeclaration {
717
759
  * 逻辑描述
718
760
  */
719
761
  description: string;
762
+ /**
763
+ * 是否隐藏
764
+ *
765
+ * 标记该功能在 IDE 面板中不展示
766
+ */
767
+ hidden?: boolean;
768
+ /**
769
+ * 废弃说明
770
+ *
771
+ * 标记该功能已废弃,可以说明被哪些新的 API 取代
772
+ */
773
+ deprecation?: string;
720
774
  /**
721
775
  * 类型参数列表
722
776
  */
@@ -231,6 +231,18 @@
231
231
  "type": "string",
232
232
  "description": "渲染时的设计值"
233
233
  },
234
+ "hidden": {
235
+ "type": "boolean",
236
+ "description": "是否隐藏\n\n标记该功能在 IDE 面板中不展示,优先级高于 if"
237
+ },
238
+ "deprecation": {
239
+ "type": "string",
240
+ "description": "废弃说明\n\n标记该功能已废弃,可以说明被哪些新的 API 取代"
241
+ },
242
+ "checkLiteralType": {
243
+ "type": "boolean",
244
+ "description": "是否按字面量类型检查\n\n当属性类型为 string、boolean 或 number literal 时,为 true 则按字面量类型严格检查,默认 false 按通用基础类型处理"
245
+ },
234
246
  "tsIf": {
235
247
  "type": "string",
236
248
  "description": "是否显隐\n\n用 TS 写表达式,在 IDE 中直接 eval"
@@ -1064,6 +1076,14 @@
1064
1076
  "type": "string",
1065
1077
  "description": "组件事件描述"
1066
1078
  },
1079
+ "hidden": {
1080
+ "type": "boolean",
1081
+ "description": "是否隐藏\n\n标记该功能在 IDE 面板中不展示"
1082
+ },
1083
+ "deprecation": {
1084
+ "type": "string",
1085
+ "description": "废弃说明\n\n标记该功能已废弃,可以说明被哪些新的 API 取代"
1086
+ },
1067
1087
  "tsType": {
1068
1088
  "type": "string",
1069
1089
  "description": "类型\n\n直接写 TS 类型,这里是个函数类型"
@@ -1101,6 +1121,14 @@
1101
1121
  "type": "string",
1102
1122
  "description": "插槽描述"
1103
1123
  },
1124
+ "hidden": {
1125
+ "type": "boolean",
1126
+ "description": "是否隐藏\n\n标记该功能在 IDE 面板中不展示"
1127
+ },
1128
+ "deprecation": {
1129
+ "type": "string",
1130
+ "description": "废弃说明\n\n标记该功能已废弃,可以说明被哪些新的 API 取代"
1131
+ },
1104
1132
  "tsType": {
1105
1133
  "type": "string",
1106
1134
  "description": "类型\n\n直接写 TS 类型"
@@ -1236,6 +1264,14 @@
1236
1264
  "type": "string",
1237
1265
  "description": "逻辑描述"
1238
1266
  },
1267
+ "hidden": {
1268
+ "type": "boolean",
1269
+ "description": "是否隐藏\n\n标记该功能在 IDE 面板中不展示"
1270
+ },
1271
+ "deprecation": {
1272
+ "type": "string",
1273
+ "description": "废弃说明\n\n标记该功能已废弃,可以说明被哪些新的 API 取代"
1274
+ },
1239
1275
  "typeParams": {
1240
1276
  "type": "array",
1241
1277
  "items": {
@@ -233,10 +233,6 @@ declare namespace nasl.ui {
233
233
  * 文档描述
234
234
  */
235
235
  docDescription?: string;
236
- /**
237
- * 隐藏绑定属性按钮
238
- */
239
- bindHide?: boolean;
240
236
  /**
241
237
  * 绑定属性并打开弹窗
242
238
  */
@@ -259,6 +255,18 @@ declare namespace nasl.ui {
259
255
  * 渲染时的设计值
260
256
  */
261
257
  designerValue?: any;
258
+ /**
259
+ * 是否隐藏
260
+ *
261
+ * 标记该功能在 IDE 面板中不展示,优先级高于 if
262
+ */
263
+ hidden?: boolean;
264
+ /**
265
+ * 废弃说明
266
+ *
267
+ * 标记该功能已废弃,可以说明被哪些新的 API 取代
268
+ */
269
+ deprecation?: string;
262
270
  /**
263
271
  * 是否显隐
264
272
  *
@@ -293,6 +301,28 @@ declare namespace nasl.ui {
293
301
  * 仅在属性类型为 string(不包括字符串枚举)的情况下,且 sync 为 falsy 时可配置
294
302
  */
295
303
  implicitToString?: T[K] extends string ? (string extends T[K] ? boolean : never) : never;
304
+ }) & ({
305
+ /**
306
+ * 隐藏绑定属性按钮
307
+ */
308
+ bindHide: true;
309
+ /**
310
+ * 是否按字面量类型检查
311
+ *
312
+ * 当属性类型为 string、boolean 或 number literal 时,为 true 则按字面量类型严格检查,默认 false 按通用基础类型处理
313
+ */
314
+ checkLiteralType: true;
315
+ } | {
316
+ /**
317
+ * 隐藏绑定属性按钮
318
+ */
319
+ bindHide?: boolean;
320
+ /**
321
+ * 是否按字面量类型检查
322
+ *
323
+ * 当属性类型为 string、boolean 或 number literal 时,为 true 则按字面量类型严格检查,默认 false 按通用基础类型处理
324
+ */
325
+ checkLiteralType?: false;
296
326
  })
297
327
 
298
328
  /**
@@ -307,6 +337,18 @@ declare namespace nasl.ui {
307
337
  * 组件事件描述
308
338
  */
309
339
  description?: string;
340
+ /**
341
+ * 是否隐藏
342
+ *
343
+ * 标记该功能在 IDE 面板中不展示
344
+ */
345
+ hidden?: boolean;
346
+ /**
347
+ * 废弃说明
348
+ *
349
+ * 标记该功能已废弃,可以说明被哪些新的 API 取代
350
+ */
351
+ deprecation?: string;
310
352
  }
311
353
 
312
354
  /**
@@ -321,6 +363,18 @@ declare namespace nasl.ui {
321
363
  * 插槽描述
322
364
  */
323
365
  description?: string;
366
+ /**
367
+ * 是否隐藏
368
+ *
369
+ * 标记该功能在 IDE 面板中不展示
370
+ */
371
+ hidden?: boolean;
372
+ /**
373
+ * 废弃说明
374
+ *
375
+ * 标记该功能已废弃,可以说明被哪些新的 API 取代
376
+ */
377
+ deprecation?: string;
324
378
  /**
325
379
  * 空的占位图
326
380
  */
@@ -343,6 +397,18 @@ declare namespace nasl.ui {
343
397
  * 逻辑描述
344
398
  */
345
399
  description: string;
400
+ /**
401
+ * 是否隐藏
402
+ *
403
+ * 标记该功能在 IDE 面板中不展示
404
+ */
405
+ hidden?: boolean;
406
+ /**
407
+ * 废弃说明
408
+ *
409
+ * 标记该功能已废弃,可以说明被哪些新的 API 取代
410
+ */
411
+ deprecation?: string;
346
412
  /**
347
413
  * 是否同步执行
348
414
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nasl/types",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "NASL types for TypeScript Declaration",
5
5
  "main": "index.d.ts",
6
6
  "scripts": {