@lcap/nasl 3.7.3-beta.1 → 3.8.0-beta.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.
Files changed (370) hide show
  1. package/.mocharc.js +0 -1
  2. package/out/automate/engine/utils.js +6 -1
  3. package/out/automate/engine/utils.js.map +1 -1
  4. package/out/bak/translator.js +37 -0
  5. package/out/bak/translator.js.map +1 -1
  6. package/out/breakpoint/shared/utils.d.ts +1 -0
  7. package/out/breakpoint/shared/utils.js +1 -1
  8. package/out/breakpoint/shared/utils.js.map +1 -1
  9. package/out/common/BaseNode.d.ts +11 -0
  10. package/out/common/BaseNode.js +101 -5
  11. package/out/common/BaseNode.js.map +1 -1
  12. package/out/concepts/Annotatable__.d.ts +109 -0
  13. package/out/concepts/Annotatable__.js +161 -0
  14. package/out/concepts/Annotatable__.js.map +1 -0
  15. package/out/concepts/AnnotationProperty__.d.ts +48 -0
  16. package/out/concepts/AnnotationProperty__.js +74 -0
  17. package/out/concepts/AnnotationProperty__.js.map +1 -0
  18. package/out/concepts/Annotation__.d.ts +128 -0
  19. package/out/concepts/Annotation__.js +248 -0
  20. package/out/concepts/Annotation__.js.map +1 -0
  21. package/out/concepts/App__.d.ts +14 -26
  22. package/out/concepts/App__.js +50 -20
  23. package/out/concepts/App__.js.map +1 -1
  24. package/out/concepts/ApplyAnnotation__.d.ts +87 -0
  25. package/out/concepts/ApplyAnnotation__.js +140 -0
  26. package/out/concepts/ApplyAnnotation__.js.map +1 -0
  27. package/out/concepts/Argument__.d.ts +19 -0
  28. package/out/concepts/Argument__.js +126 -0
  29. package/out/concepts/Argument__.js.map +1 -1
  30. package/out/concepts/AssigneeV2__.d.ts +169 -0
  31. package/out/concepts/AssigneeV2__.js +176 -1
  32. package/out/concepts/AssigneeV2__.js.map +1 -1
  33. package/out/concepts/AuthLogicForCallInterface__.js +1 -1
  34. package/out/concepts/AuthLogicForCallInterface__.js.map +1 -1
  35. package/out/concepts/AuthLogic__.js +1 -1
  36. package/out/concepts/AuthLogic__.js.map +1 -1
  37. package/out/concepts/BooleanLiteral__.d.ts +1 -0
  38. package/out/concepts/BooleanLiteral__.js +9 -0
  39. package/out/concepts/BooleanLiteral__.js.map +1 -1
  40. package/out/concepts/BusinessLogic__.js +1 -1
  41. package/out/concepts/BusinessLogic__.js.map +1 -1
  42. package/out/concepts/CallFunction__.js +1 -1
  43. package/out/concepts/CallFunction__.js.map +1 -1
  44. package/out/concepts/CallLogic__.d.ts +15 -0
  45. package/out/concepts/CallLogic__.js +149 -17
  46. package/out/concepts/CallLogic__.js.map +1 -1
  47. package/out/concepts/ConnectorLogic__.js +1 -1
  48. package/out/concepts/ConnectorLogic__.js.map +1 -1
  49. package/out/concepts/DatabaseTypeAnnotation__.d.ts +0 -2
  50. package/out/concepts/DatabaseTypeAnnotation__.js +0 -20
  51. package/out/concepts/DatabaseTypeAnnotation__.js.map +1 -1
  52. package/out/concepts/DepartmentManagerV2__.d.ts +29 -0
  53. package/out/concepts/DepartmentManagerV2__.js +56 -0
  54. package/out/concepts/DepartmentManagerV2__.js.map +1 -0
  55. package/out/concepts/DepartmentV2__.d.ts +33 -0
  56. package/out/concepts/DepartmentV2__.js +63 -0
  57. package/out/concepts/DepartmentV2__.js.map +1 -0
  58. package/out/concepts/DirectManagerV2__.d.ts +25 -0
  59. package/out/concepts/DirectManagerV2__.js +53 -0
  60. package/out/concepts/DirectManagerV2__.js.map +1 -0
  61. package/out/concepts/End__.js +9 -1
  62. package/out/concepts/End__.js.map +1 -1
  63. package/out/concepts/EntityProperty__.js +0 -2
  64. package/out/concepts/EntityProperty__.js.map +1 -1
  65. package/out/concepts/Entity__.d.ts +2 -2
  66. package/out/concepts/Entity__.js +4 -7
  67. package/out/concepts/Entity__.js.map +1 -1
  68. package/out/concepts/EnumItem__.d.ts +1 -12
  69. package/out/concepts/EnumItem__.js +17 -49
  70. package/out/concepts/EnumItem__.js.map +1 -1
  71. package/out/concepts/EnumSelectSetter__.d.ts +4 -0
  72. package/out/concepts/EnumSelectSetter__.js +7 -0
  73. package/out/concepts/EnumSelectSetter__.js.map +1 -1
  74. package/out/concepts/Enum__.js +1 -4
  75. package/out/concepts/Enum__.js.map +1 -1
  76. package/out/concepts/ForEachStatement__.js +1 -1
  77. package/out/concepts/ForEachStatement__.js.map +1 -1
  78. package/out/concepts/FrontendLibrary__.d.ts +52 -48
  79. package/out/concepts/FrontendLibrary__.js +45 -36
  80. package/out/concepts/FrontendLibrary__.js.map +1 -1
  81. package/out/concepts/FrontendType__.d.ts +4 -0
  82. package/out/concepts/FrontendType__.js +7 -0
  83. package/out/concepts/FrontendType__.js.map +1 -1
  84. package/out/concepts/Frontend__.d.ts +2 -0
  85. package/out/concepts/Frontend__.js +21 -2
  86. package/out/concepts/Frontend__.js.map +1 -1
  87. package/out/concepts/HistoryProcessV2__.js +4 -1
  88. package/out/concepts/HistoryProcessV2__.js.map +1 -1
  89. package/out/concepts/I18nInfo__.d.ts +0 -1
  90. package/out/concepts/I18nInfo__.js +0 -7
  91. package/out/concepts/I18nInfo__.js.map +1 -1
  92. package/out/concepts/Identifier__.d.ts +2 -0
  93. package/out/concepts/Identifier__.js +31 -0
  94. package/out/concepts/Identifier__.js.map +1 -1
  95. package/out/concepts/IfStatement__.js +2 -2
  96. package/out/concepts/IfStatement__.js.map +1 -1
  97. package/out/concepts/Interface__.js +1 -4
  98. package/out/concepts/Interface__.js.map +1 -1
  99. package/out/concepts/LogicItem__.d.ts +1 -1
  100. package/out/concepts/LogicItem__.js.map +1 -1
  101. package/out/concepts/Logic__.d.ts +16 -1
  102. package/out/concepts/Logic__.js +133 -15
  103. package/out/concepts/Logic__.js.map +1 -1
  104. package/out/concepts/ManagerV2__.d.ts +34 -0
  105. package/out/concepts/ManagerV2__.js +61 -0
  106. package/out/concepts/ManagerV2__.js.map +1 -0
  107. package/out/concepts/MatchCase__.d.ts +2 -2
  108. package/out/concepts/MatchCase__.js +7 -7
  109. package/out/concepts/MatchCase__.js.map +1 -1
  110. package/out/concepts/MemberExpression__.js +1 -0
  111. package/out/concepts/MemberExpression__.js.map +1 -1
  112. package/out/concepts/Module__.d.ts +88 -0
  113. package/out/concepts/Module__.js +85 -0
  114. package/out/concepts/Module__.js.map +1 -1
  115. package/out/concepts/OperatePermissionV2__.d.ts +1 -1
  116. package/out/concepts/OperatePermissionV2__.js.map +1 -1
  117. package/out/concepts/Param__.d.ts +4 -0
  118. package/out/concepts/Param__.js +13 -21
  119. package/out/concepts/Param__.js.map +1 -1
  120. package/out/concepts/ProcessElementV2__.d.ts +6 -1
  121. package/out/concepts/ProcessElementV2__.js +20 -0
  122. package/out/concepts/ProcessElementV2__.js.map +1 -1
  123. package/out/concepts/ProcessElement__.d.ts +7 -0
  124. package/out/concepts/ProcessElement__.js +47 -0
  125. package/out/concepts/ProcessElement__.js.map +1 -1
  126. package/out/concepts/ProcessV2__.d.ts +1 -34
  127. package/out/concepts/ProcessV2__.js +3 -70
  128. package/out/concepts/ProcessV2__.js.map +1 -1
  129. package/out/concepts/QueryFromExpression__.js +2 -2
  130. package/out/concepts/QueryFromExpression__.js.map +1 -1
  131. package/out/concepts/QueryJoinExpression__.js +2 -2
  132. package/out/concepts/QueryJoinExpression__.js.map +1 -1
  133. package/out/concepts/StaticString__.d.ts +0 -4
  134. package/out/concepts/StaticString__.js +0 -11
  135. package/out/concepts/StaticString__.js.map +1 -1
  136. package/out/concepts/StructureProperty__.d.ts +1 -0
  137. package/out/concepts/StructureProperty__.js +14 -5
  138. package/out/concepts/StructureProperty__.js.map +1 -1
  139. package/out/concepts/Structure__.d.ts +4 -0
  140. package/out/concepts/Structure__.js +6 -9
  141. package/out/concepts/Structure__.js.map +1 -1
  142. package/out/concepts/SubLogic__.d.ts +418 -0
  143. package/out/concepts/SubLogic__.js +992 -0
  144. package/out/concepts/SubLogic__.js.map +1 -0
  145. package/out/concepts/Theme__.d.ts +9 -0
  146. package/out/concepts/Theme__.js +10 -0
  147. package/out/concepts/Theme__.js.map +1 -1
  148. package/out/concepts/Transactional__.d.ts +0 -1
  149. package/out/concepts/Transactional__.js +0 -7
  150. package/out/concepts/Transactional__.js.map +1 -1
  151. package/out/concepts/TypeAnnotation__.js +18 -0
  152. package/out/concepts/TypeAnnotation__.js.map +1 -1
  153. package/out/concepts/TypeParam__.d.ts +1 -0
  154. package/out/concepts/TypeParam__.js.map +1 -1
  155. package/out/concepts/ValidationRule__.d.ts +6 -1
  156. package/out/concepts/ValidationRule__.js +6 -1
  157. package/out/concepts/ValidationRule__.js.map +1 -1
  158. package/out/concepts/ViewElement__.d.ts +8 -2
  159. package/out/concepts/ViewElement__.js +213 -32
  160. package/out/concepts/ViewElement__.js.map +1 -1
  161. package/out/concepts/View__.d.ts +10 -2
  162. package/out/concepts/View__.js +129 -17
  163. package/out/concepts/View__.js.map +1 -1
  164. package/out/concepts/basics/stdlib/nasl.processV2.d.ts +2 -0
  165. package/out/concepts/basics/stdlib/nasl.processV2.js +50 -4
  166. package/out/concepts/basics/stdlib/nasl.processV2.js.map +1 -1
  167. package/out/concepts/basics/types/index.d.ts +1 -1
  168. package/out/concepts/basics/types/index.js +2 -1
  169. package/out/concepts/basics/types/index.js.map +1 -1
  170. package/out/concepts/index__.d.ts +9 -0
  171. package/out/concepts/index__.js +9 -0
  172. package/out/concepts/index__.js.map +1 -1
  173. package/out/concepts/utils/asserts.d.ts +409 -0
  174. package/out/concepts/utils/asserts.js +564 -14
  175. package/out/concepts/utils/asserts.js.map +1 -1
  176. package/out/concepts/utils/types.d.ts +33 -2
  177. package/out/generator/genBundleFiles.d.ts +13 -9
  178. package/out/generator/genBundleFiles.js +383 -63
  179. package/out/generator/genBundleFiles.js.map +1 -1
  180. package/out/generator/genMetaData.js +2 -0
  181. package/out/generator/genMetaData.js.map +1 -1
  182. package/out/generator/release-body/body.js +1 -0
  183. package/out/generator/release-body/body.js.map +1 -1
  184. package/out/generator/release-body/utils.d.ts +15 -7
  185. package/out/generator/release-body/utils.js +50 -7
  186. package/out/generator/release-body/utils.js.map +1 -1
  187. package/out/natural/genNaturalTS.js +2 -4
  188. package/out/natural/genNaturalTS.js.map +1 -1
  189. package/out/natural/getContext/index.js +0 -2
  190. package/out/natural/getContext/index.js.map +1 -1
  191. package/out/natural/transformTS2UI.js.map +1 -1
  192. package/out/natural/transformTSCode.d.ts +1 -1
  193. package/out/natural/transformTSCode.js.map +1 -1
  194. package/out/server/extendBaseNode.js +9 -0
  195. package/out/server/extendBaseNode.js.map +1 -1
  196. package/out/server/getLogics.js +10 -6
  197. package/out/server/getLogics.js.map +1 -1
  198. package/out/server/getMemberIdentifier.js +6 -0
  199. package/out/server/getMemberIdentifier.js.map +1 -1
  200. package/out/server/getProcessesV2.d.ts +3 -2
  201. package/out/server/getProcessesV2.js +15 -6
  202. package/out/server/getProcessesV2.js.map +1 -1
  203. package/out/server/naslServer.d.ts +5 -1
  204. package/out/server/naslServer.js +120 -30
  205. package/out/server/naslServer.js.map +1 -1
  206. package/out/server/translator.js +4 -0
  207. package/out/server/translator.js.map +1 -1
  208. package/out/service/storage/init.d.ts +2 -1
  209. package/out/service/storage/init.js +28 -71
  210. package/out/service/storage/init.js.map +1 -1
  211. package/out/templator/genCreateBlock.d.ts +6 -2
  212. package/out/templator/genCreateBlock.js +25 -8
  213. package/out/templator/genCreateBlock.js.map +1 -1
  214. package/out/templator/genCurdEditMultipleKeyBlock.d.ts +22 -0
  215. package/out/templator/genCurdEditMultipleKeyBlock.js +60 -1
  216. package/out/templator/genCurdEditMultipleKeyBlock.js.map +1 -1
  217. package/out/templator/genCurdMultipleKeyBlock.d.ts +13 -3
  218. package/out/templator/genCurdMultipleKeyBlock.js +29 -23
  219. package/out/templator/genCurdMultipleKeyBlock.js.map +1 -1
  220. package/out/templator/genGetBlock.d.ts +1 -1
  221. package/out/templator/genGetBlock.js +3 -2
  222. package/out/templator/genGetBlock.js.map +1 -1
  223. package/out/templator/genListViewBlock.d.ts +1 -1
  224. package/out/templator/genListViewBlock.js +3 -2
  225. package/out/templator/genListViewBlock.js.map +1 -1
  226. package/out/templator/genSelectBlock.d.ts +1 -1
  227. package/out/templator/genSelectBlock.js +3 -2
  228. package/out/templator/genSelectBlock.js.map +1 -1
  229. package/out/templator/genTableBlock.d.ts +9 -4
  230. package/out/templator/genTableBlock.js +31 -17
  231. package/out/templator/genTableBlock.js.map +1 -1
  232. package/out/templator/genUpdateBlock.d.ts +2 -2
  233. package/out/templator/genUpdateBlock.js +11 -11
  234. package/out/templator/genUpdateBlock.js.map +1 -1
  235. package/out/translator/types.d.ts +0 -4
  236. package/out/translator/utils.d.ts +0 -1
  237. package/out/translator/utils.js +1 -6
  238. package/out/translator/utils.js.map +1 -1
  239. package/out/utils/delay/index.d.ts +0 -0
  240. package/out/utils/delay/index.js +1 -0
  241. package/out/utils/delay/index.js.map +1 -0
  242. package/out/utils/env.d.ts +0 -4
  243. package/out/utils/env.js +3 -6
  244. package/out/utils/env.js.map +1 -1
  245. package/out/utils/index.d.ts +3 -2
  246. package/out/utils/index.js +18 -14
  247. package/out/utils/index.js.map +1 -1
  248. package/out/utils/time-slicing/controller.js.map +1 -1
  249. package/out/utils/types.d.ts +0 -17
  250. package/package.json +27 -20
  251. package/sandbox/stdlib/extension.component.ts +29 -0
  252. package/sandbox/stdlib/nasl.process.ts +17 -0
  253. package/sandbox/stdlib/nasl.processV2.ts +10 -5
  254. package/sandbox/stdlib/nasl.util.ts +3 -1
  255. package/src/automate/engine/utils.js +7 -2
  256. package/src/bak/translator.js +42 -1
  257. package/src/breakpoint/shared/utils.ts +2 -1
  258. package/src/common/BaseNode.ts +117 -5
  259. package/src/concepts/Annotatable__.ts +263 -0
  260. package/src/concepts/AnnotationProperty__.ts +102 -0
  261. package/src/concepts/Annotation__.ts +344 -0
  262. package/src/concepts/App__.ts +917 -26
  263. package/src/concepts/ApplyAnnotation__.ts +198 -0
  264. package/src/concepts/Argument__.ts +145 -1
  265. package/src/concepts/AssigneeV2__.ts +387 -1
  266. package/src/concepts/AuthLogicForCallInterface__.ts +1 -1
  267. package/src/concepts/AuthLogic__.ts +1 -1
  268. package/src/concepts/BooleanLiteral__.ts +9 -1
  269. package/src/concepts/BusinessLogic__.ts +1 -1
  270. package/src/concepts/CallFunction__.ts +1 -1
  271. package/src/concepts/CallLogic__.ts +153 -16
  272. package/src/concepts/ConnectorLogic__.ts +1 -1
  273. package/src/concepts/DatabaseTypeAnnotation__.ts +0 -11
  274. package/src/concepts/DepartmentManagerV2__.ts +70 -0
  275. package/src/concepts/DepartmentV2__.ts +75 -0
  276. package/src/concepts/DirectManagerV2__.ts +65 -0
  277. package/src/concepts/End__.ts +10 -1
  278. package/src/concepts/EntityProperty__.ts +0 -5
  279. package/src/concepts/Entity__.ts +5 -9
  280. package/src/concepts/EnumItem__.ts +16 -65
  281. package/src/concepts/EnumSelectSetter__.ts +6 -0
  282. package/src/concepts/Enum__.ts +1 -6
  283. package/src/concepts/ForEachStatement__.ts +1 -1
  284. package/src/concepts/FrontendLibrary__.ts +88 -80
  285. package/src/concepts/FrontendType__.ts +6 -0
  286. package/src/concepts/Frontend__.ts +26 -3
  287. package/src/concepts/HistoryProcessV2__.ts +5 -0
  288. package/src/concepts/I18nInfo__.ts +0 -5
  289. package/src/concepts/Identifier__.ts +32 -0
  290. package/src/concepts/IfStatement__.ts +2 -2
  291. package/src/concepts/Interface__.ts +1 -6
  292. package/src/concepts/LogicItem__.ts +1 -0
  293. package/src/concepts/Logic__.ts +140 -17
  294. package/src/concepts/ManagerV2__.ts +78 -0
  295. package/src/concepts/MatchCase__.ts +9 -8
  296. package/src/concepts/MemberExpression__.ts +1 -0
  297. package/src/concepts/Module__.ts +194 -0
  298. package/src/concepts/OperatePermissionV2__.ts +1 -1
  299. package/src/concepts/Param__.ts +17 -20
  300. package/src/concepts/ProcessElementV2__.ts +23 -0
  301. package/src/concepts/ProcessElement__.ts +18 -0
  302. package/src/concepts/ProcessV2__.ts +4 -70
  303. package/src/concepts/QueryFromExpression__.ts +2 -2
  304. package/src/concepts/QueryJoinExpression__.ts +2 -2
  305. package/src/concepts/StaticString__.ts +0 -13
  306. package/src/concepts/StructureProperty__.ts +16 -7
  307. package/src/concepts/Structure__.ts +10 -11
  308. package/src/concepts/SubLogic__.ts +1516 -0
  309. package/src/concepts/Theme__.ts +9 -0
  310. package/src/concepts/Transactional__.ts +0 -5
  311. package/src/concepts/TriggerLauncher__.ts +1 -1
  312. package/src/concepts/TypeAnnotation__.ts +17 -0
  313. package/src/concepts/TypeParam__.ts +3 -0
  314. package/src/concepts/ValidationRule__.ts +6 -1
  315. package/src/concepts/ViewElement__.ts +224 -34
  316. package/src/concepts/View__.ts +135 -22
  317. package/src/concepts/basics/stdlib/nasl.processV2.ts +56 -3
  318. package/src/concepts/basics/types/index.ts +1 -1
  319. package/src/concepts/index__.ts +9 -0
  320. package/src/concepts/utils/asserts.ts +595 -0
  321. package/src/concepts/utils/types.ts +53 -0
  322. package/src/generator/genBundleFiles.ts +408 -68
  323. package/src/generator/genMetaData.ts +3 -0
  324. package/src/generator/release-body/body.ts +1 -0
  325. package/src/generator/release-body/utils.ts +159 -55
  326. package/src/natural/genNaturalTS.ts +3 -5
  327. package/src/natural/getContext/index.ts +0 -2
  328. package/src/natural/transformTS2UI.ts +5 -2
  329. package/src/natural/transformTSCode.ts +2 -2
  330. package/src/server/extendBaseNode.ts +11 -2
  331. package/src/server/getLogics.ts +9 -7
  332. package/src/server/getMemberIdentifier.ts +7 -0
  333. package/src/server/getProcessesV2.ts +16 -6
  334. package/src/server/naslServer.ts +133 -30
  335. package/src/server/translator.ts +4 -0
  336. package/src/service/storage/init.ts +52 -97
  337. package/src/templator/genCreateBlock.ts +35 -14
  338. package/src/templator/genCurdEditMultipleKeyBlock.ts +65 -1
  339. package/src/templator/genCurdMultipleKeyBlock.ts +42 -23
  340. package/src/templator/genGetBlock.ts +4 -3
  341. package/src/templator/genListViewBlock.ts +3 -3
  342. package/src/templator/genSelectBlock.ts +4 -2
  343. package/src/templator/genTableBlock.ts +32 -17
  344. package/src/templator/genUpdateBlock.ts +21 -18
  345. package/src/translator/types.ts +0 -4
  346. package/src/translator/utils.ts +0 -6
  347. package/src/utils/delay/index.ts +0 -0
  348. package/src/utils/env.ts +4 -5
  349. package/src/utils/index.ts +16 -4
  350. package/src/utils/time-slicing/controller.ts +1 -0
  351. package/src/utils/types.ts +0 -20
  352. package/test/concepts/validation-rule/__snapshots__/toEmbeddedTS.spec.ts.snap +2 -1
  353. package/ts-worker/bundle.js +1 -1
  354. package/ts-worker/src/index.js +1 -0
  355. package/out/utils/language-cache/constant.d.ts +0 -18
  356. package/out/utils/language-cache/constant.js +0 -35
  357. package/out/utils/language-cache/constant.js.map +0 -1
  358. package/out/utils/language-cache/index.d.ts +0 -2
  359. package/out/utils/language-cache/index.js +0 -19
  360. package/out/utils/language-cache/index.js.map +0 -1
  361. package/out/utils/language-cache/nasl.d.ts +0 -10
  362. package/out/utils/language-cache/nasl.js +0 -98
  363. package/out/utils/language-cache/nasl.js.map +0 -1
  364. package/out/utils/language-cache/types.d.ts +0 -44
  365. package/out/utils/language-cache/types.js +0 -4
  366. package/out/utils/language-cache/types.js.map +0 -1
  367. package/src/utils/language-cache/constant.ts +0 -37
  368. package/src/utils/language-cache/index.ts +0 -2
  369. package/src/utils/language-cache/nasl.ts +0 -83
  370. package/src/utils/language-cache/types.ts +0 -48
@@ -0,0 +1,109 @@
1
+ import BaseNode from '../common/BaseNode';
2
+ import ApplyAnnotation from './ApplyAnnotation__';
3
+ /**
4
+ * 可使用注解
5
+ */
6
+ export declare abstract class Annotatable extends BaseNode {
7
+ /** 类名 */
8
+ static readonly ConceptName: string;
9
+ /**
10
+ * 是否为抽象类
11
+ * 抽象类不能产生 concept: string
12
+ */
13
+ static isAbstract: boolean;
14
+ /** 继承链 */
15
+ static readonly inheritanceChain: string[];
16
+ /**
17
+ * 产品概念
18
+ */
19
+ readonly concept: 'Entity' | 'View' | 'ViewElement' | 'Logic' | 'AuthLogic' | 'AuthLogicForCallInterface' | 'BusinessLogic' | 'ConnectorLogic';
20
+ /**
21
+ * 注解列表
22
+ */
23
+ applyAnnotations?: Array<ApplyAnnotation>;
24
+ /**
25
+ * @param source 需要合并的部分参数
26
+ */
27
+ constructor(source?: Partial<Annotatable>);
28
+ static from(source: any, parentNode?: any, parentKey?: string): Annotatable;
29
+ getApplyAnnotationExistingNames(excludedList?: Array<ApplyAnnotation>): string[];
30
+ getApplyAnnotationUniqueName(name?: string): string;
31
+ /**
32
+ * 插入使用注解
33
+ * @internal
34
+ * @param name 使用注解名称,如果不填会自动生成一个唯一名称
35
+ */
36
+ _insertApplyAnnotationAt(name: string, index: number): ApplyAnnotation;
37
+ /**
38
+ * 插入使用注解
39
+ * @internal
40
+ * @param applyAnnotationOptions 使用注解参数
41
+ */
42
+ _insertApplyAnnotationAt(applyAnnotationOptions: Partial<ApplyAnnotation>, index: number): ApplyAnnotation;
43
+ /**
44
+ * 插入使用注解
45
+ * @internal
46
+ * @param applyAnnotation 已有的使用注解实例
47
+ */
48
+ _insertApplyAnnotationAt(applyAnnotation: ApplyAnnotation, index: number): ApplyAnnotation;
49
+ /**
50
+ * 插入使用注解
51
+ * @param name 使用注解名称,如果不填会自动生成一个唯一名称
52
+ */
53
+ insertApplyAnnotationAt(name: string, index: number): ApplyAnnotation;
54
+ /**
55
+ * 插入使用注解
56
+ * @param applyAnnotationOptions 使用注解参数
57
+ */
58
+ insertApplyAnnotationAt(applyAnnotationOptions: Partial<ApplyAnnotation>, index: number): ApplyAnnotation;
59
+ /**
60
+ * 插入使用注解
61
+ * @param applyAnnotation 已有的使用注解实例
62
+ */
63
+ insertApplyAnnotationAt(applyAnnotation: ApplyAnnotation, index: number): ApplyAnnotation;
64
+ /**
65
+ * 添加使用注解
66
+ * @internal
67
+ * @param name 使用注解名称,如果不填会自动生成一个唯一名称
68
+ */
69
+ _addApplyAnnotation(name?: string): ApplyAnnotation;
70
+ /**
71
+ * 添加使用注解
72
+ * @internal
73
+ * @param applyAnnotationOptions 使用注解参数
74
+ */
75
+ _addApplyAnnotation(applyAnnotationOptions: Partial<ApplyAnnotation>): ApplyAnnotation;
76
+ /**
77
+ * 添加使用注解
78
+ * @internal
79
+ * @param applyAnnotation 已有的使用注解实例
80
+ */
81
+ _addApplyAnnotation(applyAnnotation: ApplyAnnotation): ApplyAnnotation;
82
+ /**
83
+ * 添加使用注解
84
+ * @internal
85
+ * @param name 使用注解名称,如果不填会自动生成一个唯一名称
86
+ */
87
+ addApplyAnnotation(name?: string): ApplyAnnotation;
88
+ /**
89
+ * 添加使用注解
90
+ * @param applyAnnotationOptions 使用注解参数
91
+ */
92
+ addApplyAnnotation(applyAnnotationOptions: Partial<ApplyAnnotation>): ApplyAnnotation;
93
+ /**
94
+ * 添加使用注解
95
+ * @param applyAnnotation 已有的使用注解实例
96
+ */
97
+ addApplyAnnotation(applyAnnotation: ApplyAnnotation): ApplyAnnotation;
98
+ /**
99
+ * 删除使用注解
100
+ * @param name 使用注解名称
101
+ */
102
+ removeApplyAnnotation(name: string): void;
103
+ /**
104
+ * 删除使用注解
105
+ * @param applyAnnotation 已有的使用注解实例
106
+ */
107
+ removeApplyAnnotation(applyAnnotation: ApplyAnnotation): void;
108
+ }
109
+ export default Annotatable;
@@ -0,0 +1,161 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
19
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
20
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
21
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
22
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
23
+ };
24
+ var __importStar = (this && this.__importStar) || function (mod) {
25
+ if (mod && mod.__esModule) return mod;
26
+ var result = {};
27
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
28
+ __setModuleDefault(result, mod);
29
+ return result;
30
+ };
31
+ var __importDefault = (this && this.__importDefault) || function (mod) {
32
+ return (mod && mod.__esModule) ? mod : { "default": mod };
33
+ };
34
+ var Annotatable_1;
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.Annotatable = void 0;
37
+ const decorators_1 = require("../decorators");
38
+ const utils = __importStar(require("../utils"));
39
+ const asserts = __importStar(require("./utils/asserts"));
40
+ const BaseNode_1 = __importDefault(require("../common/BaseNode"));
41
+ /**
42
+ * 可使用注解
43
+ */
44
+ let Annotatable = Annotatable_1 = class Annotatable extends BaseNode_1.default {
45
+ /**
46
+ * @param source 需要合并的部分参数
47
+ */
48
+ constructor(source) {
49
+ source = Object.assign({}, Annotatable_1.getDefaultOptions(), source);
50
+ super(source);
51
+ super.subConstructor(source);
52
+ }
53
+ static from(source, parentNode, parentKey) {
54
+ return super.from(source, parentNode, parentKey);
55
+ }
56
+ getApplyAnnotationExistingNames(excludedList = []) {
57
+ const excludedSet = new Set(excludedList);
58
+ return (this.applyAnnotations || [])
59
+ .filter((item) => !excludedSet.has(item))
60
+ .map((item) => item.name);
61
+ }
62
+ getApplyAnnotationUniqueName(name = 'applyAnnotation1') {
63
+ return utils.unique(name, this.getApplyAnnotationExistingNames(), undefined, false);
64
+ }
65
+ _insertApplyAnnotationAt(options, index) {
66
+ const applyAnnotationOptions = {};
67
+ const relationOptions = { parentNode: this, parentKey: 'applyAnnotations' };
68
+ const ApplyAnnotation = (0, decorators_1.getConceptConstructor)('ApplyAnnotation');
69
+ let applyAnnotation;
70
+ if (!options) {
71
+ applyAnnotation = ApplyAnnotation.from({
72
+ ...applyAnnotationOptions,
73
+ name: this.getApplyAnnotationUniqueName(),
74
+ }, this, 'applyAnnotations');
75
+ }
76
+ else if (typeof options === 'string') {
77
+ applyAnnotation = ApplyAnnotation.from({
78
+ ...applyAnnotationOptions,
79
+ name: options,
80
+ }, this, 'applyAnnotations');
81
+ }
82
+ else if (asserts.isApplyAnnotation(options)) {
83
+ options.ensureDelete(); // 同一实例不支持多处存在
84
+ applyAnnotation = options;
85
+ Object.assign(applyAnnotation, relationOptions);
86
+ }
87
+ else {
88
+ applyAnnotation = ApplyAnnotation.from({
89
+ ...applyAnnotationOptions,
90
+ ...options,
91
+ }, this, 'applyAnnotations');
92
+ }
93
+ this.applyAnnotations.splice(index, 0, applyAnnotation);
94
+ return applyAnnotation;
95
+ }
96
+ insertApplyAnnotationAt(options, index) {
97
+ const node = this._insertApplyAnnotationAt(options, index);
98
+ node.create({
99
+ index,
100
+ parentNode: this,
101
+ parentKey: 'applyAnnotations',
102
+ });
103
+ return node;
104
+ }
105
+ _addApplyAnnotation(options) {
106
+ const index = this.applyAnnotations.length;
107
+ return this._insertApplyAnnotationAt(options, index);
108
+ }
109
+ addApplyAnnotation(options) {
110
+ const node = this._addApplyAnnotation(options);
111
+ const index = this.applyAnnotations.indexOf(node);
112
+ node.create({
113
+ index,
114
+ parentNode: this,
115
+ parentKey: 'applyAnnotations',
116
+ });
117
+ return node;
118
+ }
119
+ removeApplyAnnotation(options) {
120
+ let applyAnnotation;
121
+ if (typeof options === 'string') {
122
+ applyAnnotation = this.applyAnnotations.find((item) => item.name === options);
123
+ if (!applyAnnotation) {
124
+ throw new Error('找不到使用注解 ' + options);
125
+ }
126
+ }
127
+ else {
128
+ applyAnnotation = options;
129
+ }
130
+ return applyAnnotation.delete();
131
+ }
132
+ };
133
+ /** 类名 */
134
+ Annotatable.ConceptName = 'Annotatable';
135
+ /**
136
+ * 是否为抽象类
137
+ * 抽象类不能产生 concept: string
138
+ */
139
+ Annotatable.isAbstract = true;
140
+ /** 继承链 */
141
+ Annotatable.inheritanceChain = ['BaseNode'];
142
+ __decorate([
143
+ (0, decorators_1.property)('concept')
144
+ ], Annotatable.prototype, "concept", void 0);
145
+ __decorate([
146
+ (0, decorators_1.property)({
147
+ objectRef: 'ApplyAnnotation',
148
+ isArray: true,
149
+ defaultValue: null,
150
+ })
151
+ ], Annotatable.prototype, "applyAnnotations", void 0);
152
+ Annotatable = Annotatable_1 = __decorate([
153
+ (0, decorators_1.concept)('可使用注解')
154
+ ], Annotatable);
155
+ exports.Annotatable = Annotatable;
156
+ exports.default = Annotatable;
157
+ //================================================================================
158
+ // ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
159
+ // 自动生成的代码已结束。下面可以手动编写。
160
+ //================================================================================
161
+ //# sourceMappingURL=Annotatable__.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Annotatable__.js","sourceRoot":"","sources":["../../src/concepts/Annotatable__.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,8CAAyF;AAEzF,gDAAkC;AAGlC,yDAA2C;AAC3C,kEAA0C;AAG1C;;GAEG;AAEH,IAAsB,WAAW,mBAAjC,MAAsB,WAAY,SAAQ,kBAAQ;IAmChD;;OAEG;IACH,YAAY,MAA6B;QACvC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,aAAW,CAAC,iBAAiB,EAAE,EAAE,MAAM,CAAC,CAAC;QACpE,KAAK,CAAC,MAAM,CAAC,CAAC;QACd,KAAK,CAAC,cAAc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,SAAS,EAAE,kBAAkB;SAC9B,CAAC,CAAC;QACH,OAAO,IAAI,CAAC;IACd,CAAC;IAcD,qBAAqB,CAAC,OAAiC;QACrD,IAAI,eAAgC,CAAC;QACrC,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE;YAC/B,eAAe,GAAI,IAAI,CAAC,gBAAsC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC;YACrG,IAAI,CAAC,eAAe,EAAE;gBACpB,MAAM,IAAI,KAAK,CAAC,UAAU,GAAG,OAAO,CAAC,CAAC;aACvC;SACF;aAAM;YACL,eAAe,GAAG,OAAO,CAAC;SAC3B;QACD,OAAO,eAAe,CAAC,MAAM,EAAE,CAAC;IAClC,CAAC;CAWF,CAAA;AA7OC,SAAS;AACO,uBAAW,GAAW,aAAc,CAAA;AACpD;;;GAGG;AACI,sBAAU,GAAY,IAAK,CAAA;AAClC,UAAU;AACM,4BAAgB,GAAa,CAAC,UAAU,CAAE,CAAA;AAO1D;IAFC,IAAA,qBAAQ,EAAC,SAAS,CAAC;4CAUC;AASrB;IALC,IAAA,qBAAQ,EAAC;QACR,SAAS,EAAE,iBAAiB;QAC5B,OAAO,EAAE,IAAI;QACb,YAAY,EAAE,IAAI;KACnB,CAAC;qDACwC;AAjCtB,WAAW;IADhC,IAAA,oBAAO,EAAC,OAAO,CAAC;GACK,WAAW,CA8OhC;AA9OqB,kCAAW;AAgPjC,kBAAe,WAAW,CAAC;AAC3B,kFAAkF;AAClF,gEAAgE;AAChE,uBAAuB;AACvB,kFAAkF"}
@@ -0,0 +1,48 @@
1
+ import BaseNode from '../common/BaseNode';
2
+ import TypeAnnotation from './TypeAnnotation__';
3
+ import BaseSetter from './BaseSetter__';
4
+ import DefaultValue from './DefaultValue__';
5
+ /**
6
+ * 注解属性
7
+ */
8
+ export declare class AnnotationProperty extends BaseNode {
9
+ /** 类名 */
10
+ static readonly ConceptName: string;
11
+ /**
12
+ * 是否为抽象类
13
+ * 抽象类不能产生 concept: string
14
+ */
15
+ static isAbstract: boolean;
16
+ /** 继承链 */
17
+ static readonly inheritanceChain: string[];
18
+ /**
19
+ * 产品概念
20
+ */
21
+ readonly concept: 'AnnotationProperty';
22
+ /**
23
+ * 注解属性名称
24
+ */
25
+ name: string;
26
+ /**
27
+ * 注解属性标题
28
+ */
29
+ title: string;
30
+ /**
31
+ * 注解属性类型
32
+ */
33
+ typeAnnotation: TypeAnnotation;
34
+ /**
35
+ * 设置器
36
+ */
37
+ setter: BaseSetter;
38
+ /**
39
+ * 注解属性默认值
40
+ */
41
+ defaultValue?: DefaultValue;
42
+ /**
43
+ * @param source 需要合并的部分参数
44
+ */
45
+ constructor(source?: Partial<AnnotationProperty>);
46
+ static from(source: any, parentNode?: any, parentKey?: string): AnnotationProperty;
47
+ }
48
+ export default AnnotationProperty;
@@ -0,0 +1,74 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __importDefault = (this && this.__importDefault) || function (mod) {
9
+ return (mod && mod.__esModule) ? mod : { "default": mod };
10
+ };
11
+ var AnnotationProperty_1;
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ exports.AnnotationProperty = void 0;
14
+ const decorators_1 = require("../decorators");
15
+ const BaseNode_1 = __importDefault(require("../common/BaseNode"));
16
+ /**
17
+ * 注解属性
18
+ */
19
+ let AnnotationProperty = AnnotationProperty_1 = class AnnotationProperty extends BaseNode_1.default {
20
+ /**
21
+ * @param source 需要合并的部分参数
22
+ */
23
+ constructor(source) {
24
+ source = Object.assign({}, AnnotationProperty_1.getDefaultOptions(), source);
25
+ super(source);
26
+ super.subConstructor(source);
27
+ }
28
+ static from(source, parentNode, parentKey) {
29
+ return super.from(source, parentNode, parentKey);
30
+ }
31
+ };
32
+ /** 类名 */
33
+ AnnotationProperty.ConceptName = 'AnnotationProperty';
34
+ /**
35
+ * 是否为抽象类
36
+ * 抽象类不能产生 concept: string
37
+ */
38
+ AnnotationProperty.isAbstract = false;
39
+ /** 继承链 */
40
+ AnnotationProperty.inheritanceChain = ['BaseNode'];
41
+ __decorate([
42
+ (0, decorators_1.property)('concept')
43
+ ], AnnotationProperty.prototype, "concept", void 0);
44
+ __decorate([
45
+ (0, decorators_1.property)()
46
+ ], AnnotationProperty.prototype, "name", void 0);
47
+ __decorate([
48
+ (0, decorators_1.property)()
49
+ ], AnnotationProperty.prototype, "title", void 0);
50
+ __decorate([
51
+ (0, decorators_1.property)({
52
+ objectRef: 'TypeAnnotation',
53
+ })
54
+ ], AnnotationProperty.prototype, "typeAnnotation", void 0);
55
+ __decorate([
56
+ (0, decorators_1.property)({
57
+ objectRef: 'BaseSetter',
58
+ })
59
+ ], AnnotationProperty.prototype, "setter", void 0);
60
+ __decorate([
61
+ (0, decorators_1.property)({
62
+ objectRef: 'DefaultValue',
63
+ })
64
+ ], AnnotationProperty.prototype, "defaultValue", void 0);
65
+ AnnotationProperty = AnnotationProperty_1 = __decorate([
66
+ (0, decorators_1.concept)('注解属性')
67
+ ], AnnotationProperty);
68
+ exports.AnnotationProperty = AnnotationProperty;
69
+ exports.default = AnnotationProperty;
70
+ //================================================================================
71
+ // ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
72
+ // 自动生成的代码已结束。下面可以手动编写。
73
+ //================================================================================
74
+ //# sourceMappingURL=AnnotationProperty__.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AnnotationPro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F;AAClF,gEAAgE;AAChE,uBAAuB;AACvB,kFAAkF"}
@@ -0,0 +1,128 @@
1
+ import BaseNode from '../common/BaseNode';
2
+ import AnnotationProperty from './AnnotationProperty__';
3
+ /**
4
+ * 注解
5
+ */
6
+ export declare class Annotation extends BaseNode {
7
+ /** 类名 */
8
+ static readonly ConceptName: string;
9
+ /**
10
+ * 是否为抽象类
11
+ * 抽象类不能产生 concept: string
12
+ */
13
+ static isAbstract: boolean;
14
+ /** 继承链 */
15
+ static readonly inheritanceChain: string[];
16
+ /**
17
+ * 产品概念
18
+ */
19
+ readonly concept: 'Annotation';
20
+ /**
21
+ * 注解标识
22
+ */
23
+ name: string;
24
+ /**
25
+ * 注解描述
26
+ */
27
+ description: string;
28
+ /**
29
+ * 注解属性
30
+ */
31
+ properties: Array<AnnotationProperty>;
32
+ /**
33
+ * 可以应用到的概念
34
+ */
35
+ applyTo: Array<'Entity' | 'Logic' | 'View' | 'ViewElement'>;
36
+ /**
37
+ * @param source 需要合并的部分参数
38
+ */
39
+ constructor(source?: Partial<Annotation>);
40
+ static from(source: any, parentNode?: any, parentKey?: string): Annotation;
41
+ getAnnotationPropertyExistingNames(excludedList?: Array<AnnotationProperty>): string[];
42
+ getAnnotationPropertyUniqueName(name?: string): string;
43
+ /**
44
+ * 插入注解属性
45
+ * @internal
46
+ * @param name 注解属性名称,如果不填会自动生成一个唯一名称
47
+ */
48
+ _insertAnnotationPropertyAt(name: string, index: number): AnnotationProperty;
49
+ /**
50
+ * 插入注解属性
51
+ * @internal
52
+ * @param annotationPropertyOptions 注解属性参数
53
+ */
54
+ _insertAnnotationPropertyAt(annotationPropertyOptions: Partial<AnnotationProperty>, index: number): AnnotationProperty;
55
+ /**
56
+ * 插入注解属性
57
+ * @internal
58
+ * @param annotationProperty 已有的注解属性实例
59
+ */
60
+ _insertAnnotationPropertyAt(annotationProperty: AnnotationProperty, index: number): AnnotationProperty;
61
+ /**
62
+ * 插入注解属性
63
+ * @param name 注解属性名称,如果不填会自动生成一个唯一名称
64
+ */
65
+ insertAnnotationPropertyAt(name: string, index: number): AnnotationProperty;
66
+ /**
67
+ * 插入注解属性
68
+ * @param annotationPropertyOptions 注解属性参数
69
+ */
70
+ insertAnnotationPropertyAt(annotationPropertyOptions: Partial<AnnotationProperty>, index: number): AnnotationProperty;
71
+ /**
72
+ * 插入注解属性
73
+ * @param annotationProperty 已有的注解属性实例
74
+ */
75
+ insertAnnotationPropertyAt(annotationProperty: AnnotationProperty, index: number): AnnotationProperty;
76
+ /**
77
+ * 添加注解属性
78
+ * @internal
79
+ * @param name 注解属性名称,如果不填会自动生成一个唯一名称
80
+ */
81
+ _addAnnotationProperty(name?: string): AnnotationProperty;
82
+ /**
83
+ * 添加注解属性
84
+ * @internal
85
+ * @param annotationPropertyOptions 注解属性参数
86
+ */
87
+ _addAnnotationProperty(annotationPropertyOptions: Partial<AnnotationProperty>): AnnotationProperty;
88
+ /**
89
+ * 添加注解属性
90
+ * @internal
91
+ * @param annotationProperty 已有的注解属性实例
92
+ */
93
+ _addAnnotationProperty(annotationProperty: AnnotationProperty): AnnotationProperty;
94
+ /**
95
+ * 添加注解属性
96
+ * @internal
97
+ * @param name 注解属性名称,如果不填会自动生成一个唯一名称
98
+ */
99
+ addAnnotationProperty(name?: string): AnnotationProperty;
100
+ /**
101
+ * 添加注解属性
102
+ * @param annotationPropertyOptions 注解属性参数
103
+ */
104
+ addAnnotationProperty(annotationPropertyOptions: Partial<AnnotationProperty>): AnnotationProperty;
105
+ /**
106
+ * 添加注解属性
107
+ * @param annotationProperty 已有的注解属性实例
108
+ */
109
+ addAnnotationProperty(annotationProperty: AnnotationProperty): AnnotationProperty;
110
+ /**
111
+ * 删除注解属性
112
+ * @param name 注解属性名称
113
+ */
114
+ removeAnnotationProperty(name: string): void;
115
+ /**
116
+ * 删除注解属性
117
+ * @param annotationProperty 已有的注解属性实例
118
+ */
119
+ removeAnnotationProperty(annotationProperty: AnnotationProperty): void;
120
+ transToApplyAnno(annoprop?: any): {
121
+ concept: string;
122
+ annotationNamespace: any;
123
+ annotationName: any;
124
+ name: any;
125
+ arguments: any;
126
+ };
127
+ }
128
+ export default Annotation;