@halospv3/hce.shared-config 3.4.6 → 3.4.7-develop.1

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 (288) hide show
  1. package/CHANGELOG.md +24 -6
  2. package/mjs/CaseInsensitiveMap.d.mts +15 -0
  3. package/mjs/CaseInsensitiveMap.d.mts.map +1 -0
  4. package/mjs/CaseInsensitiveMap.mjs +2 -33
  5. package/mjs/CaseInsensitiveMap.mjs.map +1 -1
  6. package/mjs/commitlintConfig.d.mts +15 -0
  7. package/mjs/commitlintConfig.d.mts.map +1 -0
  8. package/mjs/commitlintConfig.mjs +2 -13
  9. package/mjs/commitlintConfig.mjs.map +1 -1
  10. package/mjs/debug.d.mts +9 -0
  11. package/mjs/debug.d.mts.map +1 -0
  12. package/mjs/debug.mjs +2 -9
  13. package/mjs/debug.mjs.map +1 -1
  14. package/mjs/dotnet/GithubNugetRegistryInfo.d.mts +42 -0
  15. package/mjs/dotnet/GithubNugetRegistryInfo.d.mts.map +1 -0
  16. package/mjs/dotnet/GithubNugetRegistryInfo.mjs +2 -43
  17. package/mjs/dotnet/GithubNugetRegistryInfo.mjs.map +1 -1
  18. package/mjs/dotnet/GitlabNugetRegistryInfo.d.mts +65 -0
  19. package/mjs/dotnet/GitlabNugetRegistryInfo.d.mts.map +1 -0
  20. package/mjs/dotnet/GitlabNugetRegistryInfo.mjs +2 -99
  21. package/mjs/dotnet/GitlabNugetRegistryInfo.mjs.map +1 -1
  22. package/mjs/dotnet/IsNextVersionAlreadyPublished.cli.d.mts +1 -0
  23. package/mjs/dotnet/IsNextVersionAlreadyPublished.cli.mjs +2 -44
  24. package/mjs/dotnet/IsNextVersionAlreadyPublished.cli.mjs.map +1 -1
  25. package/mjs/dotnet/MSBuildProject.d.mts +267 -0
  26. package/mjs/dotnet/MSBuildProject.d.mts.map +1 -0
  27. package/mjs/dotnet/MSBuildProject.mjs +3 -490
  28. package/mjs/dotnet/MSBuildProject.mjs.map +1 -1
  29. package/mjs/dotnet/MSBuildProjectProperties.d.mts +172 -0
  30. package/mjs/dotnet/MSBuildProjectProperties.d.mts.map +1 -0
  31. package/mjs/dotnet/MSBuildProjectProperties.mjs +2 -260
  32. package/mjs/dotnet/MSBuildProjectProperties.mjs.map +1 -1
  33. package/mjs/dotnet/NugetProjectProperties.d.mts +381 -0
  34. package/mjs/dotnet/NugetProjectProperties.d.mts.map +1 -0
  35. package/mjs/dotnet/NugetProjectProperties.mjs +2 -577
  36. package/mjs/dotnet/NugetProjectProperties.mjs.map +1 -1
  37. package/mjs/dotnet/NugetRegistryInfo.d.mts +387 -0
  38. package/mjs/dotnet/NugetRegistryInfo.d.mts.map +1 -0
  39. package/mjs/dotnet/NugetRegistryInfo.mjs +4 -752
  40. package/mjs/dotnet/NugetRegistryInfo.mjs.map +1 -1
  41. package/mjs/dotnet/helpers.d.mts +66 -0
  42. package/mjs/dotnet/helpers.d.mts.map +1 -0
  43. package/mjs/dotnet/helpers.mjs +2 -354
  44. package/mjs/dotnet/helpers.mjs.map +1 -1
  45. package/mjs/dotnet/index.d.mts +8 -0
  46. package/mjs/dotnet/index.mjs +1 -9
  47. package/mjs/dotnet.d.mts +8 -0
  48. package/mjs/dotnet.mjs +1 -9
  49. package/mjs/eslintConfig.d.mts +7 -0
  50. package/mjs/eslintConfig.d.mts.map +1 -0
  51. package/mjs/eslintConfig.mjs +2 -64
  52. package/mjs/eslintConfig.mjs.map +1 -1
  53. package/mjs/index.d.mts +2 -0
  54. package/mjs/index.mjs +1 -4
  55. package/mjs/insertPlugins.d.mts +22 -0
  56. package/mjs/insertPlugins.d.mts.map +1 -0
  57. package/mjs/insertPlugins.mjs +2 -73
  58. package/mjs/insertPlugins.mjs.map +1 -1
  59. package/mjs/semantic-release__commit-analyzer.d.mts +44 -0
  60. package/mjs/semantic-release__commit-analyzer.d.mts.map +1 -0
  61. package/mjs/semantic-release__exec.d.mts +17 -0
  62. package/mjs/semantic-release__exec.d.mts.map +1 -0
  63. package/mjs/semantic-release__git.d.mts +83 -0
  64. package/mjs/semantic-release__git.d.mts.map +1 -0
  65. package/mjs/semantic-release__github.d.mts +141 -0
  66. package/mjs/semantic-release__github.d.mts.map +1 -0
  67. package/mjs/semanticReleaseConfig.d.mts +94 -0
  68. package/mjs/semanticReleaseConfig.d.mts.map +1 -0
  69. package/mjs/semanticReleaseConfig.mjs +2 -63
  70. package/mjs/semanticReleaseConfig.mjs.map +1 -1
  71. package/mjs/semanticReleaseConfigDotnet.d.mts +96 -0
  72. package/mjs/semanticReleaseConfigDotnet.d.mts.map +1 -0
  73. package/mjs/semanticReleaseConfigDotnet.mjs +7 -274
  74. package/mjs/semanticReleaseConfigDotnet.mjs.map +1 -1
  75. package/mjs/setupGitPluginSpec.d.mts +18 -0
  76. package/mjs/setupGitPluginSpec.d.mts.map +1 -0
  77. package/mjs/setupGitPluginSpec.default.d.mts +13 -0
  78. package/mjs/setupGitPluginSpec.default.d.mts.map +1 -0
  79. package/mjs/setupGitPluginSpec.default.mjs +4 -0
  80. package/mjs/setupGitPluginSpec.default.mjs.map +1 -0
  81. package/mjs/setupGitPluginSpec.mjs +2 -144
  82. package/mjs/setupGitPluginSpec.mjs.map +1 -1
  83. package/mjs/utils/Exact.d.mts +18 -0
  84. package/mjs/utils/Exact.d.mts.map +1 -0
  85. package/mjs/utils/Exact.mjs +2 -75
  86. package/mjs/utils/Exact.mjs.map +1 -1
  87. package/mjs/utils/GracefulRecursion.d.mts +14 -0
  88. package/mjs/utils/GracefulRecursion.d.mts.map +1 -0
  89. package/mjs/utils/env.d.mts +28 -0
  90. package/mjs/utils/env.d.mts.map +1 -0
  91. package/mjs/utils/env.mjs +2 -47
  92. package/mjs/utils/env.mjs.map +1 -1
  93. package/mjs/utils/execAsync.d.mts +40 -0
  94. package/mjs/utils/execAsync.d.mts.map +1 -0
  95. package/mjs/utils/execAsync.mjs +10 -59
  96. package/mjs/utils/execAsync.mjs.map +1 -1
  97. package/mjs/utils/isError.d.mts +14 -0
  98. package/mjs/utils/isError.d.mts.map +1 -0
  99. package/mjs/utils/isError.mjs +2 -19
  100. package/mjs/utils/isError.mjs.map +1 -1
  101. package/mjs/utils/miscTypes.d.mts +16 -0
  102. package/mjs/utils/miscTypes.d.mts.map +1 -0
  103. package/mjs/utils/miscTypes.mjs +2 -10
  104. package/mjs/utils/miscTypes.mjs.map +1 -1
  105. package/mjs/utils/reflection/FunctionLike.d.mts +17 -0
  106. package/mjs/utils/reflection/FunctionLike.d.mts.map +1 -0
  107. package/mjs/utils/reflection/GetterDescriptor.d.mts +11 -0
  108. package/mjs/utils/reflection/GetterDescriptor.d.mts.map +1 -0
  109. package/mjs/utils/reflection/InstancePropertyDescriptorMap.d.mts +26 -0
  110. package/mjs/utils/reflection/InstancePropertyDescriptorMap.d.mts.map +1 -0
  111. package/mjs/utils/reflection/InstanceTypeOrSelfPropertyDescriptorMap.d.mts +17 -0
  112. package/mjs/utils/reflection/InstanceTypeOrSelfPropertyDescriptorMap.d.mts.map +1 -0
  113. package/mjs/utils/reflection/OwnGetterDescriptorMap.d.mts +18 -0
  114. package/mjs/utils/reflection/OwnGetterDescriptorMap.d.mts.map +1 -0
  115. package/mjs/utils/reflection/OwnKeyOf.d.mts +15 -0
  116. package/mjs/utils/reflection/OwnKeyOf.d.mts.map +1 -0
  117. package/mjs/utils/reflection/OwnPropertyDescriptorMap.d.mts +15 -0
  118. package/mjs/utils/reflection/OwnPropertyDescriptorMap.d.mts.map +1 -0
  119. package/mjs/utils/reflection/PropertyDescriptorMap.d.mts +13 -0
  120. package/mjs/utils/reflection/PropertyDescriptorMap.d.mts.map +1 -0
  121. package/mjs/utils/reflection/filterForGetters.d.mts +11 -0
  122. package/mjs/utils/reflection/filterForGetters.d.mts.map +1 -0
  123. package/mjs/utils/reflection/filterForGetters.mjs +2 -27
  124. package/mjs/utils/reflection/filterForGetters.mjs.map +1 -1
  125. package/mjs/utils/reflection/getOwnPropertyDescriptors.d.mts +26 -0
  126. package/mjs/utils/reflection/getOwnPropertyDescriptors.d.mts.map +1 -0
  127. package/mjs/utils/reflection/getOwnPropertyDescriptors.mjs +2 -34
  128. package/mjs/utils/reflection/getOwnPropertyDescriptors.mjs.map +1 -1
  129. package/mjs/utils/reflection/getOwnPropertyDescriptorsRecursively.d.mts +51 -0
  130. package/mjs/utils/reflection/getOwnPropertyDescriptorsRecursively.d.mts.map +1 -0
  131. package/mjs/utils/reflection/getOwnPropertyDescriptorsRecursively.mjs +2 -72
  132. package/mjs/utils/reflection/getOwnPropertyDescriptorsRecursively.mjs.map +1 -1
  133. package/mjs/utils/reflection/getPrototypeChainOf.d.mts +19 -0
  134. package/mjs/utils/reflection/getPrototypeChainOf.d.mts.map +1 -0
  135. package/mjs/utils/reflection/getPrototypeChainOf.mjs +2 -55
  136. package/mjs/utils/reflection/getPrototypeChainOf.mjs.map +1 -1
  137. package/mjs/utils/reflection/getPrototypeOf.d.mts +12 -0
  138. package/mjs/utils/reflection/getPrototypeOf.d.mts.map +1 -0
  139. package/mjs/utils/reflection/getPrototypeOf.mjs +2 -10
  140. package/mjs/utils/reflection/getPrototypeOf.mjs.map +1 -1
  141. package/mjs/utils/reflection/inheritance.d.mts +173 -0
  142. package/mjs/utils/reflection/inheritance.d.mts.map +1 -0
  143. package/mjs/utils/reflection/inheritance.mjs +2 -148
  144. package/mjs/utils/reflection/inheritance.mjs.map +1 -1
  145. package/mjs/utils/reflection/isConstructor.d.mts +20 -0
  146. package/mjs/utils/reflection/isConstructor.d.mts.map +1 -0
  147. package/mjs/utils/reflection/isConstructor.mjs +2 -63
  148. package/mjs/utils/reflection/isConstructor.mjs.map +1 -1
  149. package/mjs/utils/reflection/isGetterDescriptor.d.mts +13 -0
  150. package/mjs/utils/reflection/isGetterDescriptor.d.mts.map +1 -0
  151. package/mjs/utils/reflection/isGetterDescriptor.mjs +2 -12
  152. package/mjs/utils/reflection/isGetterDescriptor.mjs.map +1 -1
  153. package/mjs/utils/reflection/listOwnGetters.d.mts +29 -0
  154. package/mjs/utils/reflection/listOwnGetters.d.mts.map +1 -0
  155. package/mjs/utils/reflection/listOwnGetters.mjs +2 -39
  156. package/mjs/utils/reflection/listOwnGetters.mjs.map +1 -1
  157. package/mjs/utils/reflection.d.mts +18 -0
  158. package/mjs/utils/reflection.mjs +1 -10
  159. package/package.json +99 -62
  160. package/src/debug.ts +1 -0
  161. package/src/dotnet/GithubNugetRegistryInfo.ts +4 -4
  162. package/src/dotnet/GitlabNugetRegistryInfo.ts +5 -5
  163. package/src/dotnet/IsNextVersionAlreadyPublished.cli.ts +2 -1
  164. package/src/dotnet/MSBuildProject.ts +7 -6
  165. package/src/dotnet/MSBuildProjectProperties.ts +4 -3
  166. package/src/dotnet/NugetProjectProperties.ts +4 -4
  167. package/src/dotnet/NugetRegistryInfo.ts +9 -8
  168. package/src/dotnet/helpers.ts +5 -4
  169. package/src/dotnet/index.ts +8 -8
  170. package/src/dotnet.ts +1 -1
  171. package/src/index.ts +1 -1
  172. package/src/semanticReleaseConfig.ts +5 -1
  173. package/src/semanticReleaseConfigDotnet.ts +10 -8
  174. package/src/setupGitPluginSpec.default.ts +22 -0
  175. package/src/setupGitPluginSpec.ts +4 -21
  176. package/src/tsconfig.json +1 -2
  177. package/src/utils/execAsync.ts +1 -1
  178. package/src/utils/reflection/InstancePropertyDescriptorMap.d.ts +1 -1
  179. package/src/utils/reflection/InstanceTypeOrSelfPropertyDescriptorMap.d.ts +2 -2
  180. package/src/utils/reflection/OwnGetterDescriptorMap.d.ts +2 -2
  181. package/src/utils/reflection/filterForGetters.ts +5 -5
  182. package/src/utils/reflection/getOwnPropertyDescriptors.ts +4 -4
  183. package/src/utils/reflection/getOwnPropertyDescriptorsRecursively.ts +12 -12
  184. package/src/utils/reflection/getPrototypeChainOf.ts +5 -5
  185. package/src/utils/reflection/getPrototypeOf.ts +1 -1
  186. package/src/utils/reflection/inheritance.ts +5 -5
  187. package/src/utils/reflection/isGetterDescriptor.ts +1 -1
  188. package/src/utils/reflection/listOwnGetters.ts +6 -6
  189. package/src/utils/reflection.ts +17 -17
  190. package/tsconfig.base.json +2 -2
  191. package/mjs/CaseInsensitiveMap.d.ts +0 -12
  192. package/mjs/CaseInsensitiveMap.d.ts.map +0 -1
  193. package/mjs/commitlintConfig.d.ts +0 -12
  194. package/mjs/commitlintConfig.d.ts.map +0 -1
  195. package/mjs/debug.d.ts +0 -6
  196. package/mjs/debug.d.ts.map +0 -1
  197. package/mjs/dotnet/GithubNugetRegistryInfo.d.ts +0 -38
  198. package/mjs/dotnet/GithubNugetRegistryInfo.d.ts.map +0 -1
  199. package/mjs/dotnet/GitlabNugetRegistryInfo.d.ts +0 -61
  200. package/mjs/dotnet/GitlabNugetRegistryInfo.d.ts.map +0 -1
  201. package/mjs/dotnet/IsNextVersionAlreadyPublished.cli.d.ts +0 -2
  202. package/mjs/dotnet/IsNextVersionAlreadyPublished.cli.d.ts.map +0 -1
  203. package/mjs/dotnet/MSBuildProject.d.ts +0 -264
  204. package/mjs/dotnet/MSBuildProject.d.ts.map +0 -1
  205. package/mjs/dotnet/MSBuildProjectProperties.d.ts +0 -170
  206. package/mjs/dotnet/MSBuildProjectProperties.d.ts.map +0 -1
  207. package/mjs/dotnet/NugetProjectProperties.d.ts +0 -379
  208. package/mjs/dotnet/NugetProjectProperties.d.ts.map +0 -1
  209. package/mjs/dotnet/NugetRegistryInfo.d.ts +0 -384
  210. package/mjs/dotnet/NugetRegistryInfo.d.ts.map +0 -1
  211. package/mjs/dotnet/helpers.d.ts +0 -63
  212. package/mjs/dotnet/helpers.d.ts.map +0 -1
  213. package/mjs/dotnet/index.d.ts +0 -9
  214. package/mjs/dotnet/index.d.ts.map +0 -1
  215. package/mjs/dotnet/index.mjs.map +0 -1
  216. package/mjs/dotnet.d.ts +0 -2
  217. package/mjs/dotnet.d.ts.map +0 -1
  218. package/mjs/dotnet.mjs.map +0 -1
  219. package/mjs/eslintConfig.d.ts +0 -4
  220. package/mjs/eslintConfig.d.ts.map +0 -1
  221. package/mjs/index.d.ts +0 -3
  222. package/mjs/index.d.ts.map +0 -1
  223. package/mjs/index.mjs.map +0 -1
  224. package/mjs/insertPlugins.d.ts +0 -18
  225. package/mjs/insertPlugins.d.ts.map +0 -1
  226. package/mjs/semantic-release__commit-analyzer.d.mjs +0 -2
  227. package/mjs/semantic-release__commit-analyzer.d.mjs.map +0 -1
  228. package/mjs/semantic-release__exec.d.mjs +0 -2
  229. package/mjs/semantic-release__exec.d.mjs.map +0 -1
  230. package/mjs/semantic-release__git.d.mjs +0 -2
  231. package/mjs/semantic-release__git.d.mjs.map +0 -1
  232. package/mjs/semantic-release__github.d.mjs +0 -2
  233. package/mjs/semantic-release__github.d.mjs.map +0 -1
  234. package/mjs/semanticReleaseConfig.d.ts +0 -97
  235. package/mjs/semanticReleaseConfig.d.ts.map +0 -1
  236. package/mjs/semanticReleaseConfigDotnet.d.ts +0 -112
  237. package/mjs/semanticReleaseConfigDotnet.d.ts.map +0 -1
  238. package/mjs/setupGitPluginSpec.d.ts +0 -22
  239. package/mjs/setupGitPluginSpec.d.ts.map +0 -1
  240. package/mjs/utils/Exact.d.ts +0 -20
  241. package/mjs/utils/Exact.d.ts.map +0 -1
  242. package/mjs/utils/GracefulRecursion.d.mjs +0 -2
  243. package/mjs/utils/GracefulRecursion.d.mjs.map +0 -1
  244. package/mjs/utils/env.d.ts +0 -24
  245. package/mjs/utils/env.d.ts.map +0 -1
  246. package/mjs/utils/execAsync.d.ts +0 -37
  247. package/mjs/utils/execAsync.d.ts.map +0 -1
  248. package/mjs/utils/isError.d.ts +0 -11
  249. package/mjs/utils/isError.d.ts.map +0 -1
  250. package/mjs/utils/miscTypes.d.ts +0 -12
  251. package/mjs/utils/miscTypes.d.ts.map +0 -1
  252. package/mjs/utils/reflection/FunctionLike.d.mjs +0 -2
  253. package/mjs/utils/reflection/FunctionLike.d.mjs.map +0 -1
  254. package/mjs/utils/reflection/GetterDescriptor.d.mjs +0 -2
  255. package/mjs/utils/reflection/GetterDescriptor.d.mjs.map +0 -1
  256. package/mjs/utils/reflection/InstancePropertyDescriptorMap.d.mjs +0 -2
  257. package/mjs/utils/reflection/InstancePropertyDescriptorMap.d.mjs.map +0 -1
  258. package/mjs/utils/reflection/InstanceTypeOrSelfPropertyDescriptorMap.d.mjs +0 -2
  259. package/mjs/utils/reflection/InstanceTypeOrSelfPropertyDescriptorMap.d.mjs.map +0 -1
  260. package/mjs/utils/reflection/OwnGetterDescriptorMap.d.mjs +0 -2
  261. package/mjs/utils/reflection/OwnGetterDescriptorMap.d.mjs.map +0 -1
  262. package/mjs/utils/reflection/OwnKeyOf.d.mjs +0 -2
  263. package/mjs/utils/reflection/OwnKeyOf.d.mjs.map +0 -1
  264. package/mjs/utils/reflection/OwnPropertyDescriptorMap.d.mjs +0 -2
  265. package/mjs/utils/reflection/OwnPropertyDescriptorMap.d.mjs.map +0 -1
  266. package/mjs/utils/reflection/PropertyDescriptorMap.d.mjs +0 -2
  267. package/mjs/utils/reflection/PropertyDescriptorMap.d.mjs.map +0 -1
  268. package/mjs/utils/reflection/filterForGetters.d.ts +0 -7
  269. package/mjs/utils/reflection/filterForGetters.d.ts.map +0 -1
  270. package/mjs/utils/reflection/getOwnPropertyDescriptors.d.ts +0 -22
  271. package/mjs/utils/reflection/getOwnPropertyDescriptors.d.ts.map +0 -1
  272. package/mjs/utils/reflection/getOwnPropertyDescriptorsRecursively.d.ts +0 -56
  273. package/mjs/utils/reflection/getOwnPropertyDescriptorsRecursively.d.ts.map +0 -1
  274. package/mjs/utils/reflection/getPrototypeChainOf.d.ts +0 -16
  275. package/mjs/utils/reflection/getPrototypeChainOf.d.ts.map +0 -1
  276. package/mjs/utils/reflection/getPrototypeOf.d.ts +0 -8
  277. package/mjs/utils/reflection/getPrototypeOf.d.ts.map +0 -1
  278. package/mjs/utils/reflection/inheritance.d.ts +0 -180
  279. package/mjs/utils/reflection/inheritance.d.ts.map +0 -1
  280. package/mjs/utils/reflection/isConstructor.d.ts +0 -17
  281. package/mjs/utils/reflection/isConstructor.d.ts.map +0 -1
  282. package/mjs/utils/reflection/isGetterDescriptor.d.ts +0 -9
  283. package/mjs/utils/reflection/isGetterDescriptor.d.ts.map +0 -1
  284. package/mjs/utils/reflection/listOwnGetters.d.ts +0 -26
  285. package/mjs/utils/reflection/listOwnGetters.d.ts.map +0 -1
  286. package/mjs/utils/reflection.d.ts +0 -18
  287. package/mjs/utils/reflection.d.ts.map +0 -1
  288. package/mjs/utils/reflection.mjs.map +0 -1
@@ -0,0 +1,13 @@
1
+ //#region src/utils/reflection/PropertyDescriptorMap.d.ts
2
+ /**
3
+ * A variant of TypeScript's ES5 PropertyDescriptorMap with an extra generic
4
+ * parameter for omitting inherited keys.
5
+ * @template T The type described by the {@link PropertyDescriptorMap}.
6
+ * @template [__proto__=null]
7
+ * The `null` or the `object`-like `[[Prototype]]` of {@link T}.
8
+ * @since 3.0.0
9
+ */
10
+ type PropertyDescriptorMap<T, __proto__ extends object | null = null> = __proto__ extends null ? { [P0 in keyof T]: TypedPropertyDescriptor<T[P0]> } : Omit<{ [P0 in keyof T]: TypedPropertyDescriptor<T[P0]> }, keyof { [P1 in keyof __proto__]: TypedPropertyDescriptor<__proto__[P1]> }>;
11
+ //#endregion
12
+ export { PropertyDescriptorMap };
13
+ //# sourceMappingURL=PropertyDescriptorMap.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PropertyDescriptorMap.d.mts","names":["PropertyDescriptorMap","T","__proto__","P0","TypedPropertyDescriptor","P1","Omit"],"sources":["../../../src/utils/reflection/PropertyDescriptorMap.d.ts"],"mappings":";;AAQA;;;;;;;KAAYA,qBAAAA,8CACRE,SAAAA,+BACiBD,CAAAA,GAAIG,uBAAAA,CAAwBH,CAAAA,CAAEE,EAAAA,OAC7CG,IAAAA,gBACeL,CAAAA,GAAIG,uBAAAA,CAAwBH,CAAAA,CAAEE,EAAAA,2BACxBD,SAAAA,GAAYE,uBAAAA,CAAwBF,SAAAA,CAAUG,EAAAA"}
@@ -0,0 +1,11 @@
1
+ import { BaseClassProto, ClassLike, ConstructorConstraint, InstanceTypeOrSelf, SuperClassLike, WithProto, baseClassProto } from "./inheritance.mjs";
2
+ import { InstancePropertyDescriptorMap } from "./InstancePropertyDescriptorMap.mjs";
3
+ import { OwnGetterDescriptorMap } from "./OwnGetterDescriptorMap.mjs";
4
+ import { OwnPropertyDescriptorMap } from "./OwnPropertyDescriptorMap.mjs";
5
+
6
+ //#region src/utils/reflection/filterForGetters.d.ts
7
+ declare function filterForGetters<Class extends ClassLike<ConstructorConstraint<Class> & WithProto<SuperClassLike | typeof baseClassProto>>>(descriptorMap: InstancePropertyDescriptorMap<Class>): Partial<OwnGetterDescriptorMap<InstanceType<Class>, Class["__proto__"] extends BaseClassProto ? null : InstanceTypeOrSelf<Class["__proto__"]>>>;
8
+ declare function filterForGetters<Class extends ClassLike<ConstructorConstraint<Class> & WithProto<SuperClassLike | BaseClassProto>>>(descriptorMap: OwnPropertyDescriptorMap<Class>): Partial<OwnGetterDescriptorMap<Class, Class["__proto__"]>>;
9
+ //#endregion
10
+ export { filterForGetters };
11
+ //# sourceMappingURL=filterForGetters.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"filterForGetters.d.mts","names":[],"sources":["../../../src/utils/reflection/filterForGetters.ts"],"mappings":";;;;;;iBAcgB,gBAAA,eACA,SAAA,CAAU,qBAAA,CAAsB,KAAA,IAAS,SAAA,CAAU,cAAA,UAAwB,cAAA,GAAA,CAEzF,aAAA,EAAe,6BAAA,CAA8B,KAAA,IAC5C,OAAA,CAAQ,sBAAA,CACT,YAAA,CAAa,KAAA,GACb,KAAA,sBAA2B,cAAA,UAAwB,kBAAA,CAAmB,KAAA;AAAA,iBAExD,gBAAA,eACA,SAAA,CAAU,qBAAA,CAAsB,KAAA,IAAS,SAAA,CAAU,cAAA,GAAiB,cAAA,GAAA,CAElF,aAAA,EAAe,wBAAA,CAAyB,KAAA,IACvC,OAAA,CAAQ,sBAAA,CAAuB,KAAA,EAAO,KAAA"}
@@ -1,27 +1,2 @@
1
- /**
2
- * Iterates through the descriptors object, checking for property descriptors whose `get` is a function.
3
- * Returns an {@link OwnGetterDescriptorMap} of the getters.
4
- * If you want only own, non-inherited getters, you must filter sanitize the
5
- * type the `descriptors` parameter yourself e.g. `Omit<Class, keyof
6
- * SuperClass>`.
7
- * @param descriptorMap An object like the return value of Object.getOwnPropertyDescriptors
8
- * @template Class Any ClassLike type
9
- * @template T Any `object`-like type.
10
- * @template [__proto__=null] If {@link Class} is not {@link ClassLike}, the `__proto__` of {@link T}.
11
- * @returns An {@link OwnGetterDescriptorMap}.
12
- * @since 3.0.0
13
- */
14
- function filterForGetters(descriptorMap) {
15
- let getterDescriptorMap = {};
16
- for (const key in descriptorMap) {
17
- const element = descriptorMap[key];
18
- if (typeof element.get === 'function') {
19
- getterDescriptorMap = Object.assign(getterDescriptorMap, {
20
- [key]: element
21
- });
22
- }
23
- }
24
- return getterDescriptorMap;
25
- }
26
- export { filterForGetters };
27
- //# sourceMappingURL=filterForGetters.mjs.map
1
+ function e(e){let t={};for(let n in e){let r=e[n];typeof r.get==`function`&&(t=Object.assign(t,{[n]:r}))}return t}export{e as filterForGetters};
2
+ //# sourceMappingURL=filterForGetters.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"filterForGetters.mjs","sources":["../../../src/utils/reflection/filterForGetters.ts"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,gBAAgB,CAAC,aAAa,EAAE;AAChD,EAAE,IAAI,mBAAmB,GAAG,EAAE;AAC9B,EAAE,KAAK,MAAM,GAAG,IAAI,aAAa,EAAE;AACnC,IAAI,MAAM,OAAO,GAAG,aAAa,CAAC,GAAG,CAAC;AACtC,IAAI,IAAI,OAAO,OAAO,CAAC,GAAG,KAAK,UAAU,EAAE;AAC3C,MAAM,mBAAmB,GAAG,MAAM,CAAC,MAAM,CAAC,mBAAmB,EAAE;AAC/D,QAAQ,CAAC,GAAG,GAAG;AACf,OAAO,CAAC;AACR,IAAI;AACJ,EAAE;AACF,EAAE,OAAO,mBAAmB;AAC5B;;;;"}
1
+ {"version":3,"file":"filterForGetters.mjs","names":[],"sources":["../../../src/utils/reflection/filterForGetters.ts"],"sourcesContent":["import type {\n BaseClassProto,\n baseClassProto,\n ClassLike,\n ConstructorConstraint,\n InstanceTypeOrSelf,\n SuperClassLike,\n WithProto,\n} from './inheritance.ts';\nimport type { InstancePropertyDescriptorMap } from './InstancePropertyDescriptorMap.d.ts';\nimport type { OwnGetterDescriptorMap } from './OwnGetterDescriptorMap.d.ts';\nimport type { OwnPropertyDescriptorMap } from './OwnPropertyDescriptorMap.d.ts';\nimport type { PropertyDescriptorMap } from './PropertyDescriptorMap.d.ts';\n\nexport function filterForGetters<\n Class extends ClassLike<ConstructorConstraint<Class> & WithProto<SuperClassLike | typeof baseClassProto>>,\n>(\n descriptorMap: InstancePropertyDescriptorMap<Class>,\n): Partial<OwnGetterDescriptorMap<\n InstanceType<Class>,\n Class['__proto__'] extends BaseClassProto ? null : InstanceTypeOrSelf<Class['__proto__']>\n>>;\nexport function filterForGetters<\n Class extends ClassLike<ConstructorConstraint<Class> & WithProto<SuperClassLike | BaseClassProto>>,\n>(\n descriptorMap: OwnPropertyDescriptorMap<Class>,\n): Partial<OwnGetterDescriptorMap<Class, Class['__proto__']>>;\n/**\n * Iterates through the descriptors object, checking for property descriptors whose `get` is a function.\n * Returns an {@link OwnGetterDescriptorMap} of the getters.\n * If you want only own, non-inherited getters, you must filter sanitize the\n * type the `descriptors` parameter yourself e.g. `Omit<Class, keyof\n * SuperClass>`.\n * @param descriptorMap An object like the return value of Object.getOwnPropertyDescriptors\n * @template Class Any ClassLike type\n * @template T Any `object`-like type.\n * @template [__proto__=null] If {@link Class} is not {@link ClassLike}, the `__proto__` of {@link T}.\n * @returns An {@link OwnGetterDescriptorMap}.\n * @since 3.0.0\n */\nexport function filterForGetters<\n T extends object,\n __proto__ extends object | null = null,\n>(\n descriptorMap: PropertyDescriptorMap<T, __proto__> | PropertyDescriptorMap<T>,\n): Partial<OwnGetterDescriptorMap<T, __proto__>> {\n let getterDescriptorMap: Partial<OwnGetterDescriptorMap<T, __proto__>> = {};\n for (const key in descriptorMap) {\n const element = descriptorMap[key as keyof typeof descriptorMap];\n if (typeof element.get === 'function') {\n getterDescriptorMap = Object.assign(\n getterDescriptorMap,\n { [key]: element },\n );\n }\n }\n\n return getterDescriptorMap;\n}\n"],"mappings":"AAwCA,SAAgB,EAId,EAC+C,CAC/C,IAAI,EAAqE,EAAE,CAC3E,IAAK,IAAM,KAAO,EAAe,CAC/B,IAAM,EAAU,EAAc,GAC1B,OAAO,EAAQ,KAAQ,aACzB,EAAsB,OAAO,OAC3B,EACA,EAAG,GAAM,EAAS,CACnB,EAIL,OAAO"}
@@ -0,0 +1,26 @@
1
+ import { InstanceOrStatic } from "../miscTypes.mjs";
2
+ import { BaseClassProto, ClassLike, ConstructorConstraint, SuperClassLike, WithProto } from "./inheritance.mjs";
3
+ import { InstancePropertyDescriptorMap } from "./InstancePropertyDescriptorMap.mjs";
4
+ import { OwnPropertyDescriptorMap } from "./OwnPropertyDescriptorMap.mjs";
5
+
6
+ //#region src/utils/reflection/getOwnPropertyDescriptors.d.ts
7
+ /**
8
+ * Get the property descriptors of the class or constructor similar to {@link Object.getOwnPropertyDescriptors}, but with more options--including recursion.
9
+ * @template {InstanceOrStatic} _InstanceOrStatic 'Instance' or 'Static'. Determines the return type.
10
+ * @param classDefinition A class or constructor, cast to {@link ClassLike}.
11
+ * @param instanceOrStatic 'Instance' or 'Static'. Determines the return type.
12
+ * @template {ClassLike<ConstructorConstraint<Class> & WithProto<SuperClassLike | BaseClassProto>>} Class
13
+ * The typeof {@link classDefinition}.
14
+ * {@link WithProto}<{@link SuperClassLike}> is necessary for walking the
15
+ * prototype chain for both Instance and Static properties.
16
+ * If unspecified, the return type may be incorrect.
17
+ * @returns ({@link instanceOrStatic} === 'Instance') ? {@link InstancePropertyDescriptorMap<Class>}\
18
+ * : ({@link instanceOrStatic} === 'Static') ? {@link OwnPropertyDescriptorMap<Class>}\
19
+ * : never
20
+ * @throws {TypeError}
21
+ * @since 3.0.0
22
+ */
23
+ declare function getOwnPropertyDescriptors<Class extends ClassLike<ConstructorConstraint<Class> & WithProto<SuperClassLike | BaseClassProto>>, _InstanceOrStatic extends InstanceOrStatic>(classDefinition: Class, instanceOrStatic: _InstanceOrStatic): [_InstanceOrStatic] extends ["Instance"] ? InstancePropertyDescriptorMap<Class> : [_InstanceOrStatic] extends ["Static"] ? OwnPropertyDescriptorMap<Class> : never;
24
+ //#endregion
25
+ export { getOwnPropertyDescriptors };
26
+ //# sourceMappingURL=getOwnPropertyDescriptors.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getOwnPropertyDescriptors.d.mts","names":[],"sources":["../../../src/utils/reflection/getOwnPropertyDescriptors.ts"],"mappings":";;;;;;;;AAqBA;;;;;;;;;;;;;;iBAAgB,yBAAA,eACA,SAAA,CAAU,qBAAA,CAAsB,KAAA,IAAS,SAAA,CAAU,cAAA,GAAiB,cAAA,8BACxD,gBAAA,CAAA,CAE1B,eAAA,EAAiB,KAAA,EACjB,gBAAA,EAAkB,iBAAA,IAChB,iBAAA,yBACA,6BAAA,CAA8B,KAAA,KAC7B,iBAAA,uBACG,wBAAA,CAAyB,KAAA"}
@@ -1,34 +1,2 @@
1
- /**
2
- * Get the property descriptors of the class or constructor similar to {@link Object.getOwnPropertyDescriptors}, but with more options--including recursion.
3
- * @template {InstanceOrStatic} _InstanceOrStatic 'Instance' or 'Static'. Determines the return type.
4
- * @param classDefinition A class or constructor, cast to {@link ClassLike}.
5
- * @param instanceOrStatic 'Instance' or 'Static'. Determines the return type.
6
- * @template {ClassLike<ConstructorConstraint<Class> & WithProto<SuperClassLike | BaseClassProto>>} Class
7
- * The typeof {@link classDefinition}.
8
- * {@link WithProto}<{@link SuperClassLike}> is necessary for walking the
9
- * prototype chain for both Instance and Static properties.
10
- * If unspecified, the return type may be incorrect.
11
- * @returns ({@link instanceOrStatic} === 'Instance') ? {@link InstancePropertyDescriptorMap<Class>}\
12
- * : ({@link instanceOrStatic} === 'Static') ? {@link OwnPropertyDescriptorMap<Class>}\
13
- * : never
14
- * @throws {TypeError}
15
- * @since 3.0.0
16
- */
17
- function getOwnPropertyDescriptors(classDefinition, instanceOrStatic) {
18
- switch (instanceOrStatic) {
19
- case 'Instance':
20
- {
21
- return Object.getOwnPropertyDescriptors(classDefinition.prototype);
22
- }
23
- case 'Static':
24
- {
25
- return Object.getOwnPropertyDescriptors(classDefinition);
26
- }
27
- default:
28
- {
29
- throw new TypeError('Argument `instanceOrStatic` must be "Instance" or "Static".');
30
- }
31
- }
32
- }
33
- export { getOwnPropertyDescriptors };
34
- //# sourceMappingURL=getOwnPropertyDescriptors.mjs.map
1
+ function e(e,t){switch(t){case`Instance`:return Object.getOwnPropertyDescriptors(e.prototype);case`Static`:return Object.getOwnPropertyDescriptors(e);default:throw TypeError('Argument `instanceOrStatic` must be "Instance" or "Static".')}}export{e as getOwnPropertyDescriptors};
2
+ //# sourceMappingURL=getOwnPropertyDescriptors.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"getOwnPropertyDescriptors.mjs","sources":["../../../src/utils/reflection/getOwnPropertyDescriptors.ts"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,yBAAyB,CAAC,eAAe,EAAE,gBAAgB,EAAE;AAC7E,EAAE,QAAQ,gBAAgB;AAC1B,IAAI,KAAK,UAAU;AACnB,MAAM;AACN,QAAQ,OAAO,MAAM,CAAC,yBAAyB,CAAC,eAAe,CAAC,SAAS,CAAC;AAC1E,MAAM;AACN,IAAI,KAAK,QAAQ;AACjB,MAAM;AACN,QAAQ,OAAO,MAAM,CAAC,yBAAyB,CAAC,eAAe,CAAC;AAChE,MAAM;AACN,IAAI;AACJ,MAAM;AACN,QAAQ,MAAM,IAAI,SAAS,CAAC,6DAA6D,CAAC;AAC1F,MAAM;AACN;AACA;;;;"}
1
+ {"version":3,"file":"getOwnPropertyDescriptors.mjs","names":[],"sources":["../../../src/utils/reflection/getOwnPropertyDescriptors.ts"],"sourcesContent":["import type { InstanceOrStatic } from '../miscTypes.ts';\nimport type { BaseClassProto, ClassLike, ConstructorConstraint, SuperClassLike, WithProto } from './inheritance.ts';\nimport type { InstancePropertyDescriptorMap } from './InstancePropertyDescriptorMap.d.ts';\nimport type { OwnPropertyDescriptorMap } from './OwnPropertyDescriptorMap.d.ts';\n\n/**\n * Get the property descriptors of the class or constructor similar to {@link Object.getOwnPropertyDescriptors}, but with more options--including recursion.\n * @template {InstanceOrStatic} _InstanceOrStatic 'Instance' or 'Static'. Determines the return type.\n * @param classDefinition A class or constructor, cast to {@link ClassLike}.\n * @param instanceOrStatic 'Instance' or 'Static'. Determines the return type.\n * @template {ClassLike<ConstructorConstraint<Class> & WithProto<SuperClassLike | BaseClassProto>>} Class\n * The typeof {@link classDefinition}.\n * {@link WithProto}<{@link SuperClassLike}> is necessary for walking the\n * prototype chain for both Instance and Static properties.\n * If unspecified, the return type may be incorrect.\n * @returns ({@link instanceOrStatic} === 'Instance') ? {@link InstancePropertyDescriptorMap<Class>}\\\n * : ({@link instanceOrStatic} === 'Static') ? {@link OwnPropertyDescriptorMap<Class>}\\\n * : never\n * @throws {TypeError}\n * @since 3.0.0\n */\nexport function getOwnPropertyDescriptors<\n Class extends ClassLike<ConstructorConstraint<Class> & WithProto<SuperClassLike | BaseClassProto>>,\n _InstanceOrStatic extends InstanceOrStatic,\n>(\n classDefinition: Class,\n instanceOrStatic: _InstanceOrStatic,\n): [_InstanceOrStatic] extends ['Instance']\n ? InstancePropertyDescriptorMap<Class>\n : [_InstanceOrStatic] extends ['Static']\n ? OwnPropertyDescriptorMap<Class>\n : never {\n switch (instanceOrStatic) {\n case 'Instance': {\n return Object.getOwnPropertyDescriptors(classDefinition.prototype) as [Extract<typeof instanceOrStatic, 'Instance'>] extends ['Instance']\n ? InstancePropertyDescriptorMap<Class>\n : [_InstanceOrStatic] extends ['Static']\n ? OwnPropertyDescriptorMap<Class>\n : never;\n }\n case 'Static': {\n return Object.getOwnPropertyDescriptors(classDefinition) as [Extract<typeof instanceOrStatic, 'Static'>] extends ['Instance']\n ? InstancePropertyDescriptorMap<Class>\n : [_InstanceOrStatic] extends ['Static']\n ? OwnPropertyDescriptorMap<Class>\n : never;\n }\n default: {\n throw new TypeError('Argument `instanceOrStatic` must be \"Instance\" or \"Static\".');\n }\n }\n}\n"],"mappings":"AAqBA,SAAgB,EAId,EACA,EAKY,CACZ,OAAQ,EAAR,CACE,IAAK,WACH,OAAO,OAAO,0BAA0B,EAAgB,UAAU,CAMpE,IAAK,SACH,OAAO,OAAO,0BAA0B,EAAgB,CAM1D,QACE,MAAU,UAAU,8DAA8D"}
@@ -0,0 +1,51 @@
1
+ import { Increment } from "../GracefulRecursion.mjs";
2
+ import { InstanceOrStatic, Integer } from "../miscTypes.mjs";
3
+ import { BaseClass, BaseClassProto, ClassLike, ConstructorConstraint, ConstructorLike, SuperClassLike, WithProto } from "./inheritance.mjs";
4
+ import { InstanceTypeOrSelfPropertyDescriptorMap } from "./InstanceTypeOrSelfPropertyDescriptorMap.mjs";
5
+ import { OwnPropertyDescriptorMap } from "./OwnPropertyDescriptorMap.mjs";
6
+
7
+ //#region src/utils/reflection/getOwnPropertyDescriptorsRecursively.d.ts
8
+ /**
9
+ * A conditional wrapper for {@link InstanceTypeOrSelfPropertyDescriptorMap} and
10
+ * {@link OwnPropertyDescriptorMap}.
11
+ *
12
+ * If {@link _InstanceOrStatic} is 'Instance', {@link InstanceTypeOrSelfPropertyDescriptorMap}.\
13
+ * Else if {@link _InstanceOrStatic} is 'Static',
14
+ * {@link OwnPropertyDescriptorMap }.\
15
+ * Else, `never`.
16
+ * @template {ConstructorConstraint<Class> & WithProto<SuperClassLike | BaseClassProto>} Class
17
+ * A class definition cast to {@link ClassLike}.
18
+ * @template {InstanceOrStatic} _InstanceOrStatic
19
+ * 'Instance' or 'Static'. Determines the return type.
20
+ * @since 3.0.0
21
+ */
22
+ type RecursedPropertyDescriptorMap<Class extends ConstructorConstraint<Class> & WithProto<SuperClassLike | BaseClassProto>, _InstanceOrStatic extends InstanceOrStatic> = [_InstanceOrStatic] extends ["Instance"] ? InstanceTypeOrSelfPropertyDescriptorMap<Class, Class["__proto__"]> : [_InstanceOrStatic] extends ["Static"] ? OwnPropertyDescriptorMap<Class> : never;
23
+ /**
24
+ * An
25
+ * ordered array of {@link OwnPropertyDescriptorMap} or
26
+ * {@link InstancePropertyDescriptorMap} starting with {@link classDefinition}
27
+ * and ending with a {@link BaseClass}.
28
+ * @template {ConstructorConstraint<Class> & WithProto<SuperClassLike | BaseClassProto>} Class
29
+ * @template {'Instance' | 'Static'} InstanceOrStatic
30
+ * @template {Integer<number>} [Limit=16]
31
+ * @template {Integer<number>} [CurrentLevel=0]
32
+ */
33
+ type RecursedPropertyDescriptorMapArray<Class extends ConstructorConstraint<Class> & WithProto<SuperClassLike | BaseClassProto>, InstanceOrStatic extends "Instance" | "Static", Limit extends Integer<number> = 16, CurrentLevel extends Integer<number> = 0> = Class["__proto__"] extends BaseClassProto["__proto__"] | BaseClassProto["__proto__"]["__proto__"] ? never : Class["__proto__"] extends BaseClassProto ? [RecursedPropertyDescriptorMap<BaseClass<Class>, InstanceOrStatic>] : Class["__proto__"] extends ConstructorLike<Class["__proto__"]> ? [RecursedPropertyDescriptorMap<Class, InstanceOrStatic>, ...RecursedPropertyDescriptorMapArray<ClassLike<Exclude<Class["__proto__"], BaseClassProto> & WithProto<SuperClassLike | BaseClassProto>>, InstanceOrStatic, Limit, Increment<CurrentLevel>>] : never;
34
+ /**
35
+ * Walks the class inheritance chain to get a PropertyDescriptorMap of each class.
36
+ *
37
+ * While you _can_ use this to get an array of getter names/keys, you should use {@link getPrototypeOf} and {@link listOwnGetters}, instead!
38
+ * @template Class Any class definition type-cast to {@link ClassLike}
39
+ * @template _InstanceOrStatic
40
+ * @param classDefinition Any class definition type-cast to {@link ClassLike}
41
+ * @param instanceOrStatic 'Instance' or 'Static'. Determines the return type.
42
+ * @returns An
43
+ * ordered array of {@link OwnPropertyDescriptorMap} or
44
+ * {@link InstancePropertyDescriptorMap} starting with {@link classDefinition}
45
+ * and ending with a {@link BaseClass}.
46
+ * @since 3.0.0
47
+ */
48
+ declare function getOwnPropertyDescriptorsRecursively<Class extends ClassLike<ConstructorConstraint<Class> & WithProto<SuperClassLike | BaseClassProto>>, _InstanceOrStatic extends InstanceOrStatic, Limit extends Integer<number> = 16>(classDefinition: Class, instanceOrStatic: _InstanceOrStatic): RecursedPropertyDescriptorMapArray<Class, _InstanceOrStatic>;
49
+ //#endregion
50
+ export { RecursedPropertyDescriptorMap, RecursedPropertyDescriptorMapArray, getOwnPropertyDescriptorsRecursively };
51
+ //# sourceMappingURL=getOwnPropertyDescriptorsRecursively.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getOwnPropertyDescriptorsRecursively.d.mts","names":[],"sources":["../../../src/utils/reflection/getOwnPropertyDescriptorsRecursively.ts"],"mappings":";;;;;;;;;AAuCA;;;;;;;;;;;;KAAY,6BAAA,eACI,qBAAA,CAAsB,KAAA,IAAS,SAAA,CAAU,cAAA,GAAiB,cAAA,6BAC9C,gBAAA,KACvB,iBAAA,yBAA0C,uCAAA,CAAwC,KAAA,EAAO,KAAA,kBACzF,iBAAA,uBAAwC,wBAAA,CAAyB,KAAA;;;;;;;;;;;KAa1D,kCAAA,eACI,qBAAA,CAAsB,KAAA,IAAS,SAAA,CAAU,cAAA,GAAiB,cAAA,iEAE1D,OAAA,oCACO,OAAA,gBACnB,KAAA,sBAA2B,cAAA,gBAA8B,cAAA,qCACzD,KAAA,sBAA2B,cAAA,IAAkB,6BAAA,CAA8B,SAAA,CAAU,KAAA,GAAQ,gBAAA,KAC3F,KAAA,sBAA2B,eAAA,CAAgB,KAAA,kBAEvC,6BAAA,CAA8B,KAAA,EAAO,gBAAA,MAClC,kCAAA,CACD,SAAA,CAAU,OAAA,CAAQ,KAAA,eAAoB,cAAA,IAAkB,SAAA,CAAU,cAAA,GAAiB,cAAA,IACnF,gBAAA,EACA,KAAA,EACA,SAAA,CAAU,YAAA;;;;AAdtB;;;;;;;;;;;iBAgCgB,oCAAA,eAEA,SAAA,CAAU,qBAAA,CAAsB,KAAA,IAAS,SAAA,CAAU,cAAA,GAAiB,cAAA,8BACxD,gBAAA,gBAEZ,OAAA,cAAA,CAEd,eAAA,EAAiB,KAAA,EACjB,gBAAA,EAAkB,iBAAA,GACjB,kCAAA,CAAmC,KAAA,EAAO,iBAAA"}
@@ -1,72 +1,2 @@
1
- import { getOwnPropertyDescriptors } from './getOwnPropertyDescriptors.mjs';
2
- import { getPrototypesChainOf } from './getPrototypeChainOf.mjs';
3
-
4
- /* eslint-disable jsdoc/check-tag-names */
5
- /**
6
- * JSDoc type imports
7
- * @typedef {import('./getPrototypeOf.js').getPrototypeOf} getPrototypeOf
8
- * @typedef {import('./listOwnGetters.js').listOwnGetters} listOwnGetters
9
- * @typedef {import('./InstancePropertyDescriptorMap.js').InstancePropertyDescriptorMap} InstancePropertyDescriptorMap
10
- */
11
- /* eslint-enable jsdoc/check-tag-names */
12
-
13
- /**
14
- * A conditional wrapper for {@link InstanceTypeOrSelfPropertyDescriptorMap} and
15
- * {@link OwnPropertyDescriptorMap}.
16
- *
17
- * If {@link _InstanceOrStatic} is 'Instance', {@link InstanceTypeOrSelfPropertyDescriptorMap}.\
18
- * Else if {@link _InstanceOrStatic} is 'Static',
19
- * {@link OwnPropertyDescriptorMap }.\
20
- * Else, `never`.
21
- * @template {ConstructorConstraint<Class> & WithProto<SuperClassLike | BaseClassProto>} Class
22
- * A class definition cast to {@link ClassLike}.
23
- * @template {InstanceOrStatic} _InstanceOrStatic
24
- * 'Instance' or 'Static'. Determines the return type.
25
- * @since 3.0.0
26
- */
27
-
28
- /**
29
- * An
30
- * ordered array of {@link OwnPropertyDescriptorMap} or
31
- * {@link InstancePropertyDescriptorMap} starting with {@link classDefinition}
32
- * and ending with a {@link BaseClass}.
33
- * @template {ConstructorConstraint<Class> & WithProto<SuperClassLike | BaseClassProto>} Class
34
- * @template {'Instance' | 'Static'} InstanceOrStatic
35
- * @template {Integer<number>} [Limit=16]
36
- * @template {Integer<number>} [CurrentLevel=0]
37
- */
38
-
39
- /**
40
- * Walks the class inheritance chain to get a PropertyDescriptorMap of each class.
41
- *
42
- * While you _can_ use this to get an array of getter names/keys, you should use {@link getPrototypeOf} and {@link listOwnGetters}, instead!
43
- * @template Class Any class definition type-cast to {@link ClassLike}
44
- * @template _InstanceOrStatic
45
- * @param classDefinition Any class definition type-cast to {@link ClassLike}
46
- * @param instanceOrStatic 'Instance' or 'Static'. Determines the return type.
47
- * @returns An
48
- * ordered array of {@link OwnPropertyDescriptorMap} or
49
- * {@link InstancePropertyDescriptorMap} starting with {@link classDefinition}
50
- * and ending with a {@link BaseClass}.
51
- * @since 3.0.0
52
- */
53
- function getOwnPropertyDescriptorsRecursively(classDefinition, instanceOrStatic) {
54
- const staticProtoChain = getPrototypesChainOf(classDefinition, 'classes');
55
- if (isSingleTuple(staticProtoChain)) {
56
- return [getOwnPropertyDescriptors(staticProtoChain[0], instanceOrStatic)];
57
- }
58
- const recursedPropertyDescriptorMapArray = staticProtoChain.map(classDefinition => getOwnPropertyDescriptors(classDefinition, instanceOrStatic));
59
- return recursedPropertyDescriptorMapArray;
60
- }
61
-
62
- /**
63
- * Simple utility for single-tuple type assertion
64
- * @template {T} T T in T[]
65
- * @param array an array
66
- * @returns array is [T]
67
- */
68
- function isSingleTuple(array) {
69
- return Array.isArray(array) && array.length === 1;
70
- }
71
- export { getOwnPropertyDescriptorsRecursively };
72
- //# sourceMappingURL=getOwnPropertyDescriptorsRecursively.mjs.map
1
+ import{getOwnPropertyDescriptors as e}from"./getOwnPropertyDescriptors.mjs";import{getPrototypesChainOf as t}from"./getPrototypeChainOf.mjs";function n(n,i){let a=t(n,`classes`);return r(a)?[e(a[0],i)]:a.map(t=>e(t,i))}function r(e){return Array.isArray(e)&&e.length===1}export{n as getOwnPropertyDescriptorsRecursively};
2
+ //# sourceMappingURL=getOwnPropertyDescriptorsRecursively.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"getOwnPropertyDescriptorsRecursively.mjs","sources":["../../../src/utils/reflection/getOwnPropertyDescriptorsRecursively.ts"],"names":[],"mappings":";;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,oCAAoC,CAAC,eAAe,EAAE,gBAAgB,EAAE;AACxF,EAAE,MAAM,gBAAgB,GAAG,oBAAoB,CAAC,eAAe,EAAE,SAAS,CAAC;AAC3E,EAAE,IAAI,aAAa,CAAC,gBAAgB,CAAC,EAAE;AACvC,IAAI,OAAO,CAAC,yBAAyB,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,gBAAgB,CAAC,CAAC;AAC7E,EAAE;AACF,EAAE,MAAM,kCAAkC,GAAG,gBAAgB,CAAC,GAAG,CAAC,eAAe,IAAI,yBAAyB,CAAC,eAAe,EAAE,gBAAgB,CAAC,CAAC;AAClJ,EAAE,OAAO,kCAAkC;AAC3C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,aAAa,CAAC,KAAK,EAAE;AAC9B,EAAE,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;AACnD;;;;"}
1
+ {"version":3,"file":"getOwnPropertyDescriptorsRecursively.mjs","names":[],"sources":["../../../src/utils/reflection/getOwnPropertyDescriptorsRecursively.ts"],"sourcesContent":["import type { Increment } from '../GracefulRecursion.d.ts';\nimport type { InstanceOrStatic, Integer } from '../miscTypes.ts';\nimport { getOwnPropertyDescriptors } from './getOwnPropertyDescriptors.ts';\nimport { getPrototypesChainOf } from './getPrototypeChainOf.ts';\nimport type {\n BaseClass,\n BaseClassProto,\n ClassLike,\n ConstructorConstraint,\n ConstructorLike,\n ProtoChainOfClass,\n SuperClassLike,\n WithProto,\n} from './inheritance.ts';\nimport type { InstanceTypeOrSelfPropertyDescriptorMap } from './InstanceTypeOrSelfPropertyDescriptorMap.d.ts';\nimport type { OwnPropertyDescriptorMap } from './OwnPropertyDescriptorMap.d.ts';\n/**\n * JSDoc type imports\n */\n/* eslint-disable @typescript-eslint/no-unused-vars */\nimport type { getPrototypeOf as _getPrototypeOf } from './getPrototypeOf.ts';\nimport type { listOwnGetters as _listOwnGetters } from './listOwnGetters.ts';\nimport type { InstancePropertyDescriptorMap as _InstancePropertyDescriptorMap } from './InstancePropertyDescriptorMap.d.ts';\n/* eslint-enable @typescript-eslint/no-unused-vars */\n\n/**\n * A conditional wrapper for {@link InstanceTypeOrSelfPropertyDescriptorMap} and\n * {@link OwnPropertyDescriptorMap}.\n *\n * If {@link _InstanceOrStatic} is 'Instance', {@link InstanceTypeOrSelfPropertyDescriptorMap}.\\\n * Else if {@link _InstanceOrStatic} is 'Static',\n * {@link OwnPropertyDescriptorMap }.\\\n * Else, `never`.\n * @template {ConstructorConstraint<Class> & WithProto<SuperClassLike | BaseClassProto>} Class\n * A class definition cast to {@link ClassLike}.\n * @template {InstanceOrStatic} _InstanceOrStatic\n * 'Instance' or 'Static'. Determines the return type.\n * @since 3.0.0\n */\nexport type RecursedPropertyDescriptorMap<\n Class extends ConstructorConstraint<Class> & WithProto<SuperClassLike | BaseClassProto>,\n _InstanceOrStatic extends InstanceOrStatic,\n> = [_InstanceOrStatic] extends ['Instance'] ? InstanceTypeOrSelfPropertyDescriptorMap<Class, Class['__proto__']>\n : [_InstanceOrStatic] extends ['Static'] ? OwnPropertyDescriptorMap<Class>\n : never;\n\n/**\n * An\n * ordered array of {@link OwnPropertyDescriptorMap} or\n * {@link InstancePropertyDescriptorMap} starting with {@link classDefinition}\n * and ending with a {@link BaseClass}.\n * @template {ConstructorConstraint<Class> & WithProto<SuperClassLike | BaseClassProto>} Class\n * @template {'Instance' | 'Static'} InstanceOrStatic\n * @template {Integer<number>} [Limit=16]\n * @template {Integer<number>} [CurrentLevel=0]\n */\nexport type RecursedPropertyDescriptorMapArray<\n Class extends ConstructorConstraint<Class> & WithProto<SuperClassLike | BaseClassProto>,\n InstanceOrStatic extends 'Instance' | 'Static',\n Limit extends Integer<number> = 16,\n CurrentLevel extends Integer<number> = 0,\n> = Class['__proto__'] extends BaseClassProto['__proto__'] | BaseClassProto['__proto__']['__proto__'] ? never\n : Class['__proto__'] extends BaseClassProto ? [RecursedPropertyDescriptorMap<BaseClass<Class>, InstanceOrStatic>]\n : Class['__proto__'] extends ConstructorLike<Class['__proto__']>\n ? [\n RecursedPropertyDescriptorMap<Class, InstanceOrStatic>,\n ...RecursedPropertyDescriptorMapArray<\n ClassLike<Exclude<Class['__proto__'], BaseClassProto> & WithProto<SuperClassLike | BaseClassProto>>,\n InstanceOrStatic,\n Limit,\n Increment<CurrentLevel>\n >,\n ]\n : never;\n/**\n * Walks the class inheritance chain to get a PropertyDescriptorMap of each class.\n *\n * While you _can_ use this to get an array of getter names/keys, you should use {@link getPrototypeOf} and {@link listOwnGetters}, instead!\n * @template Class Any class definition type-cast to {@link ClassLike}\n * @template _InstanceOrStatic\n * @param classDefinition Any class definition type-cast to {@link ClassLike}\n * @param instanceOrStatic 'Instance' or 'Static'. Determines the return type.\n * @returns An\n * ordered array of {@link OwnPropertyDescriptorMap} or\n * {@link InstancePropertyDescriptorMap} starting with {@link classDefinition}\n * and ending with a {@link BaseClass}.\n * @since 3.0.0\n */\nexport function getOwnPropertyDescriptorsRecursively<\n // Class extends ClassLike<ConstructorConstraint<Class> & WithProto<SuperClassLike | BaseClassProto>>,\n Class extends ClassLike<ConstructorConstraint<Class> & WithProto<SuperClassLike | BaseClassProto>>,\n _InstanceOrStatic extends InstanceOrStatic,\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters\n Limit extends Integer<number> = 16,\n>(\n classDefinition: Class,\n instanceOrStatic: _InstanceOrStatic,\n): RecursedPropertyDescriptorMapArray<Class, _InstanceOrStatic> {\n const staticProtoChain: ProtoChainOfClass<Class> = getPrototypesChainOf(classDefinition, 'classes');\n if (isSingleTuple(staticProtoChain)) {\n return [\n getOwnPropertyDescriptors(\n staticProtoChain[0],\n instanceOrStatic,\n ) as RecursedPropertyDescriptorMap<Class, _InstanceOrStatic>,\n ] as unknown as RecursedPropertyDescriptorMapArray<Class, _InstanceOrStatic, Limit>;\n }\n\n const recursedPropertyDescriptorMapArray = staticProtoChain.map(classDefinition =>\n getOwnPropertyDescriptors(\n classDefinition,\n instanceOrStatic,\n ),\n );\n\n return recursedPropertyDescriptorMapArray as RecursedPropertyDescriptorMapArray<Class, _InstanceOrStatic>;\n}\n\n/**\n * Simple utility for single-tuple type assertion\n * @template {T} T T in T[]\n * @param array an array\n * @returns array is [T]\n */\nfunction isSingleTuple<T>(array: T[]): array is [T] {\n return Array.isArray(array) && array.length === 1;\n}\n"],"mappings":"6IAwFA,SAAgB,EAOd,EACA,EAC8D,CAC9D,IAAM,EAA6C,EAAqB,EAAiB,UAAU,CAiBnG,OAhBI,EAAc,EAAiB,CAC1B,CACL,EACE,EAAiB,GACjB,EACD,CACF,CAGwC,EAAiB,IAAI,GAC9D,EACE,EACA,EACD,CACF,CAWH,SAAS,EAAiB,EAA0B,CAClD,OAAO,MAAM,QAAQ,EAAM,EAAI,EAAM,SAAW"}
@@ -0,0 +1,19 @@
1
+ import { BaseClassProto, ClassLike, ConstructorConstraint, ProtoChainOfClass, ProtoChainOfClassInstance, SuperClassLike, WithProto } from "./inheritance.mjs";
2
+
3
+ //#region src/utils/reflection/getPrototypeChainOf.d.ts
4
+ type ProtoChain<Class extends ClassLike<ConstructorConstraint<Class> & WithProto<SuperClassLike | BaseClassProto>>, ClassesOrInstances extends "classes" | "classInstances"> = [ClassesOrInstances] extends ["classInstances"] ? ProtoChainOfClassInstance<Class> : [ClassesOrInstances] extends ["classes"] ? ProtoChainOfClass<Class> : never;
5
+ /**
6
+ * Iterate through the class and its base/super classes until an anonymous function is reached. This is the default superclass all classes extend.
7
+ * @template Class Any {@link ClassLike} type.
8
+ * @template ClassesOrInstances 'classes' or 'classInstances'
9
+ * @param classDefinition Any class type satisfying {@link Class}. This class (or its instance type) is included in the return value.
10
+ * @param [returnType='classes'] Determines return type. If 'classInstances', the return type is an array of the classes' `.prototype`. Else, the classes themselves are returned.
11
+ * @since 3.0.0
12
+ * @returns
13
+ * `returnType extends 'classInstances' ? ClassLike<T>[] : ClassLike<T>[].map(c => c.prototype)`
14
+ * Excludes default superclasses e.g. anonymous functions, native code.
15
+ */
16
+ declare function getPrototypesChainOf<Class extends ClassLike<ConstructorConstraint<Class> & WithProto<SuperClassLike | BaseClassProto>>, ClassesOrInstances extends "classes" | "classInstances">(classDefinition: Class, returnType: ClassesOrInstances): ProtoChain<Class, ClassesOrInstances>;
17
+ //#endregion
18
+ export { getPrototypesChainOf };
19
+ //# sourceMappingURL=getPrototypeChainOf.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getPrototypeChainOf.d.mts","names":[],"sources":["../../../src/utils/reflection/getPrototypeChainOf.ts"],"mappings":";;;KAeK,UAAA,eACW,SAAA,CAAU,qBAAA,CAAsB,KAAA,IAAS,SAAA,CAAU,cAAA,GAAiB,cAAA,gEAE/E,kBAAA,+BAAiD,yBAAA,CAA0B,KAAA,KAC3E,kBAAA,wBAA0C,iBAAA,CAAkB,KAAA;;;;;;;;;;;;iBAcjD,oBAAA,eACA,SAAA,CAAU,qBAAA,CAAsB,KAAA,IAAS,SAAA,CAAU,cAAA,GAAiB,cAAA,4DAAA,CAGlF,eAAA,EAAiB,KAAA,EACjB,UAAA,EAAY,kBAAA,GACX,UAAA,CAAW,KAAA,EAAO,kBAAA"}
@@ -1,55 +1,2 @@
1
- import { getPrototypeOf } from './getPrototypeOf.mjs';
2
- import { baseClassProto } from './inheritance.mjs';
3
- import { isConstructor } from './isConstructor.mjs';
4
-
5
- /* eslint-disable jsdoc/no-defaults */
6
-
7
- /**
8
- * Iterate through the class and its base/super classes until an anonymous function is reached. This is the default superclass all classes extend.
9
- * @template Class Any {@link ClassLike} type.
10
- * @template ClassesOrInstances 'classes' or 'classInstances'
11
- * @param classDefinition Any class type satisfying {@link Class}. This class (or its instance type) is included in the return value.
12
- * @param [returnType='classes'] Determines return type. If 'classInstances', the return type is an array of the classes' `.prototype`. Else, the classes themselves are returned.
13
- * @since 3.0.0
14
- * @returns
15
- * `returnType extends 'classInstances' ? ClassLike<T>[] : ClassLike<T>[].map(c => c.prototype)`
16
- * Excludes default superclasses e.g. anonymous functions, native code.
17
- */
18
- function getPrototypesChainOf(classDefinition, returnType) {
19
- // class definitions or their respective .prototype; exclude default superclasses.
20
- let current = classDefinition;
21
- let parent;
22
- const returnValue = [];
23
- let index = 0;
24
- while (baseClassProto !== current) {
25
- parent = getPrototypeOf(current);
26
- // current is a Class symbol/constructor. Object.getOwnPropertyDescriptors on current will include static properties.
27
- if (!isConstructor(current)) break;
28
- if (returnType === 'classInstances') {
29
- const instanceOfCurrent = current.prototype;
30
- returnValue[index] = instanceOfCurrent;
31
- } else {
32
- returnValue[index] = current;
33
- }
34
-
35
- /**
36
- * Assign the super class to current.
37
- * If the argument is a class, Reflect.getPrototypeOf method returns the
38
- * superclass.
39
- */
40
- if (isConstructor(parent) && 'name' in parent && typeof parent.name === 'string' && '' !== parent.name // it's possible for a Function/Constructor to be anonymous...
41
- ) {
42
- current = parent;
43
- } else {
44
- break;
45
- }
46
- index++;
47
- }
48
- return returnValue;
49
- /*
50
- assuming current is NugetProjectProperties...
51
- Reflect.getPrototypeOf(current).name is 'MSBuildProjectProperties'
52
- */
53
- }
54
- export { getPrototypesChainOf };
55
- //# sourceMappingURL=getPrototypeChainOf.mjs.map
1
+ import{getPrototypeOf as e}from"./getPrototypeOf.mjs";import{baseClassProto as t}from"./inheritance.mjs";import{isConstructor as n}from"./isConstructor.mjs";function r(r,i){let a=r,o,s=[],c=0;for(;t!==a&&(o=e(a),n(a))&&(i===`classInstances`?s[c]=a.prototype:s[c]=a,n(o)&&`name`in o&&typeof o.name==`string`&&o.name!==``);)a=o,c++;return s}export{r as getPrototypesChainOf};
2
+ //# sourceMappingURL=getPrototypeChainOf.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"getPrototypeChainOf.mjs","sources":["../../../src/utils/reflection/getPrototypeChainOf.ts"],"names":[],"mappings":";;;;AAAA;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,oBAAoB,CAAC,eAAe,EAAE,UAAU,EAAE;AAClE;AACA,EAAE,IAAI,OAAO,GAAG,eAAe;AAC/B,EAAE,IAAI,MAAM;AACZ,EAAE,MAAM,WAAW,GAAG,EAAE;AACxB,EAAE,IAAI,KAAK,GAAG,CAAC;AACf,EAAE,OAAO,cAAc,KAAK,OAAO,EAAE;AACrC,IAAI,MAAM,GAAG,cAAc,CAAC,OAAO,CAAC;AACpC;AACA,IAAI,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,EAAE;AACjC,IAAI,IAAI,UAAU,KAAK,gBAAgB,EAAE;AACzC,MAAM,MAAM,iBAAiB,GAAG,OAAO,CAAC,SAAS;AACjD,MAAM,WAAW,CAAC,KAAK,CAAC,GAAG,iBAAiB;AAC5C,IAAI,CAAC,MAAM;AACX,MAAM,WAAW,CAAC,KAAK,CAAC,GAAG,OAAO;AAClC,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA,IAAI,IAAI,aAAa,CAAC,MAAM,CAAC,IAAI,MAAM,IAAI,MAAM,IAAI,OAAO,MAAM,CAAC,IAAI,KAAK,QAAQ,IAAI,EAAE,KAAK,MAAM,CAAC,IAAI;AAC1G,MAAM;AACN,MAAM,OAAO,GAAG,MAAM;AACtB,IAAI,CAAC,MAAM;AACX,MAAM;AACN,IAAI;AACJ,IAAI,KAAK,EAAE;AACX,EAAE;AACF,EAAE,OAAO,WAAW;AACpB;AACA;AACA;AACA;AACA;;;;"}
1
+ {"version":3,"file":"getPrototypeChainOf.mjs","names":[],"sources":["../../../src/utils/reflection/getPrototypeChainOf.ts"],"sourcesContent":["/* eslint-disable jsdoc/no-defaults */\nimport type { TupleIndices } from '../miscTypes.ts';\nimport { getPrototypeOf } from './getPrototypeOf.ts';\nimport {\n baseClassProto,\n type BaseClassProto,\n type ClassLike,\n type ConstructorConstraint,\n type ProtoChainOfClass,\n type ProtoChainOfClassInstance,\n type SuperClassLike,\n type WithProto,\n} from './inheritance.ts';\nimport { isConstructor } from './isConstructor.ts';\n\ntype ProtoChain<\n Class extends ClassLike<ConstructorConstraint<Class> & WithProto<SuperClassLike | BaseClassProto>>,\n ClassesOrInstances extends 'classes' | 'classInstances',\n> = [ClassesOrInstances] extends ['classInstances'] ? ProtoChainOfClassInstance<Class>\n : [ClassesOrInstances] extends ['classes'] ? ProtoChainOfClass<Class>\n : never;\n\n/**\n * Iterate through the class and its base/super classes until an anonymous function is reached. This is the default superclass all classes extend.\n * @template Class Any {@link ClassLike} type.\n * @template ClassesOrInstances 'classes' or 'classInstances'\n * @param classDefinition Any class type satisfying {@link Class}. This class (or its instance type) is included in the return value.\n * @param [returnType='classes'] Determines return type. If 'classInstances', the return type is an array of the classes' `.prototype`. Else, the classes themselves are returned.\n * @since 3.0.0\n * @returns\n * `returnType extends 'classInstances' ? ClassLike<T>[] : ClassLike<T>[].map(c => c.prototype)`\n * Excludes default superclasses e.g. anonymous functions, native code.\n */\nexport function getPrototypesChainOf<\n Class extends ClassLike<ConstructorConstraint<Class> & WithProto<SuperClassLike | BaseClassProto>>,\n ClassesOrInstances extends 'classes' | 'classInstances',\n>(\n classDefinition: Class,\n returnType: ClassesOrInstances,\n): ProtoChain<Class, ClassesOrInstances> {\n // class definitions or their respective .prototype; exclude default superclasses.\n let current: ProtoChainOfClass<Class>[TupleIndices<ProtoChainOfClass<Class>>] = classDefinition as ProtoChainOfClass<Class>[0 extends TupleIndices<ProtoChainOfClass<Class>> ? 0 : never];\n let parent: typeof current & WithProto<SuperClassLike | BaseClassProto> | object;\n const returnValue = [] as unknown as\n ProtoChain<Class, ClassesOrInstances>;\n let index: TupleIndices<typeof returnValue> = 0 as TupleIndices<typeof returnValue>;\n\n while (baseClassProto !== current) {\n parent = getPrototypeOf(current);\n // current is a Class symbol/constructor. Object.getOwnPropertyDescriptors on current will include static properties.\n if (!isConstructor(current))\n break;\n if (returnType === 'classInstances') {\n const instanceOfCurrent = current.prototype as InstanceType<typeof current>;\n\n returnValue[index] = instanceOfCurrent as typeof returnValue[typeof index];\n }\n else {\n returnValue[index] = current as typeof returnValue[typeof index];\n }\n\n /**\n * Assign the super class to current.\n * If the argument is a class, Reflect.getPrototypeOf method returns the\n * superclass.\n */\n if (\n isConstructor(parent)\n && 'name' in parent\n && typeof parent.name === 'string'\n && '' !== parent.name // it's possible for a Function/Constructor to be anonymous...\n ) {\n current = parent as ProtoChainOfClass<Class>[TupleIndices<ProtoChainOfClass<Class>>];\n }\n else {\n break;\n }\n index++;\n }\n return returnValue;\n /*\n assuming current is NugetProjectProperties...\n Reflect.getPrototypeOf(current).name is 'MSBuildProjectProperties'\n */\n}\n"],"mappings":"6JAiCA,SAAgB,EAId,EACA,EACuC,CAEvC,IAAI,EAA4E,EAC5E,EACE,EAAc,EAAE,CAElB,EAA0C,EAE9C,KAAO,IAAmB,IACxB,EAAS,EAAe,EAAQ,CAE3B,EAAc,EAAQ,IAEvB,IAAe,iBAGjB,EAAY,GAFc,EAAQ,UAKlC,EAAY,GAAS,EASrB,EAAc,EAAO,EAClB,SAAU,GACV,OAAO,EAAO,MAAS,UAChB,EAAO,OAAd,KAEH,EAAU,EAKZ,IAEF,OAAO"}
@@ -0,0 +1,12 @@
1
+ import { ProtoOrSuperClass, WithProto } from "./inheritance.mjs";
2
+
3
+ //#region src/utils/reflection/getPrototypeOf.d.ts
4
+ /**
5
+ * A nearly useless wrapper for {@link Reflect.getPrototypeOf}
6
+ * @param object An object with the internal `__proto__` property present in its type.
7
+ * @returns The `__proto__` of the `object` param.
8
+ */
9
+ declare function getPrototypeOf<T extends WithProto<ProtoOrSuperClass>>(object: T): T["__proto__"];
10
+ //#endregion
11
+ export { getPrototypeOf };
12
+ //# sourceMappingURL=getPrototypeOf.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getPrototypeOf.d.mts","names":[],"sources":["../../../src/utils/reflection/getPrototypeOf.ts"],"mappings":";;;;;AAOA;;;iBAAgB,cAAA,WACJ,SAAA,CAAU,iBAAA,EAAA,CACpB,MAAA,EAAQ,CAAA,GAAI,CAAA"}
@@ -1,10 +1,2 @@
1
- /**
2
- * A nearly useless wrapper for {@link Reflect.getPrototypeOf}
3
- * @param object An object with the internal `__proto__` property present in its type.
4
- * @returns The `__proto__` of the `object` param.
5
- */
6
- function getPrototypeOf(object) {
7
- return Reflect.getPrototypeOf(object);
8
- }
9
- export { getPrototypeOf };
10
- //# sourceMappingURL=getPrototypeOf.mjs.map
1
+ function e(e){return Reflect.getPrototypeOf(e)}export{e as getPrototypeOf};
2
+ //# sourceMappingURL=getPrototypeOf.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"getPrototypeOf.mjs","sources":["../../../src/utils/reflection/getPrototypeOf.ts"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACO,SAAS,cAAc,CAAC,MAAM,EAAE;AACvC,EAAE,OAAO,OAAO,CAAC,cAAc,CAAC,MAAM,CAAC;AACvC;;;;"}
1
+ {"version":3,"file":"getPrototypeOf.mjs","names":[],"sources":["../../../src/utils/reflection/getPrototypeOf.ts"],"sourcesContent":["import type { ProtoOrSuperClass, WithProto } from './inheritance.ts';\n\n/**\n * A nearly useless wrapper for {@link Reflect.getPrototypeOf}\n * @param object An object with the internal `__proto__` property present in its type.\n * @returns The `__proto__` of the `object` param.\n */\nexport function getPrototypeOf<\n T extends WithProto<ProtoOrSuperClass>,\n>(object: T): T['__proto__'] {\n return Reflect.getPrototypeOf(object) as T['__proto__'];\n}\n"],"mappings":"AAOA,SAAgB,EAEd,EAA2B,CAC3B,OAAO,QAAQ,eAAe,EAAO"}