@halospv3/hce.shared-config 3.0.0-develop.2 → 3.0.0-develop.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +164 -0
- package/dotnet/.github/workflows/_unit_test.yml +0 -3
- package/dotnet/.github/workflows/dotnet-release.yml +0 -3
- package/dotnet/.github/workflows/sample-dotnet-build.yml +0 -3
- package/dotnet/PublishAll.targets +3 -2
- package/dotnet/ZipPublishDir.targets +24 -29
- package/mjs/CaseInsensitiveMap.d.ts +12 -0
- package/mjs/CaseInsensitiveMap.d.ts.map +1 -0
- package/mjs/CaseInsensitiveMap.mjs +33 -0
- package/mjs/CaseInsensitiveMap.mjs.map +1 -0
- package/mjs/commitlintConfig.d.ts +12 -0
- package/mjs/commitlintConfig.d.ts.map +1 -0
- package/mjs/commitlintConfig.mjs +13 -0
- package/mjs/commitlintConfig.mjs.map +1 -0
- package/mjs/debug.d.ts +6 -0
- package/mjs/debug.d.ts.map +1 -0
- package/mjs/debug.mjs +9 -0
- package/mjs/debug.mjs.map +1 -0
- package/mjs/dotnet/GithubNugetRegistryInfo.d.ts +38 -0
- package/mjs/dotnet/GithubNugetRegistryInfo.d.ts.map +1 -0
- package/mjs/dotnet/GithubNugetRegistryInfo.mjs +43 -0
- package/mjs/dotnet/GithubNugetRegistryInfo.mjs.map +1 -0
- package/mjs/dotnet/GitlabNugetRegistryInfo.d.ts +62 -0
- package/mjs/dotnet/GitlabNugetRegistryInfo.d.ts.map +1 -0
- package/mjs/dotnet/GitlabNugetRegistryInfo.mjs +99 -0
- package/mjs/dotnet/GitlabNugetRegistryInfo.mjs.map +1 -0
- package/mjs/dotnet/IsNextVersionAlreadyPublished.cli.d.ts +2 -0
- package/mjs/dotnet/IsNextVersionAlreadyPublished.cli.d.ts.map +1 -0
- package/mjs/dotnet/IsNextVersionAlreadyPublished.cli.mjs +41 -0
- package/mjs/dotnet/IsNextVersionAlreadyPublished.cli.mjs.map +1 -0
- package/mjs/dotnet/MSBuildProject.d.ts +256 -0
- package/mjs/dotnet/MSBuildProject.d.ts.map +1 -0
- package/mjs/dotnet/MSBuildProject.mjs +447 -0
- package/mjs/dotnet/MSBuildProject.mjs.map +1 -0
- package/mjs/dotnet/MSBuildProjectProperties.d.ts +170 -0
- package/mjs/dotnet/MSBuildProjectProperties.d.ts.map +1 -0
- package/mjs/dotnet/MSBuildProjectProperties.mjs +260 -0
- package/mjs/dotnet/MSBuildProjectProperties.mjs.map +1 -0
- package/mjs/dotnet/NugetProjectProperties.d.ts +379 -0
- package/mjs/dotnet/NugetProjectProperties.d.ts.map +1 -0
- package/mjs/dotnet/NugetProjectProperties.mjs +577 -0
- package/mjs/dotnet/NugetProjectProperties.mjs.map +1 -0
- package/mjs/dotnet/NugetRegistryInfo.d.ts +384 -0
- package/mjs/dotnet/NugetRegistryInfo.d.ts.map +1 -0
- package/mjs/dotnet/NugetRegistryInfo.mjs +752 -0
- package/mjs/dotnet/NugetRegistryInfo.mjs.map +1 -0
- package/mjs/dotnet/helpers.d.ts +63 -0
- package/mjs/dotnet/helpers.d.ts.map +1 -0
- package/mjs/dotnet/helpers.mjs +354 -0
- package/mjs/dotnet/helpers.mjs.map +1 -0
- package/mjs/dotnet/index.d.ts +9 -0
- package/mjs/dotnet/index.d.ts.map +1 -0
- package/mjs/dotnet/index.mjs +9 -0
- package/mjs/dotnet/index.mjs.map +1 -0
- package/mjs/dotnet.d.ts +2 -0
- package/mjs/dotnet.d.ts.map +1 -0
- package/mjs/dotnet.mjs +9 -0
- package/mjs/dotnet.mjs.map +1 -0
- package/mjs/eslintConfig.d.ts +4 -0
- package/mjs/eslintConfig.d.ts.map +1 -0
- package/mjs/eslintConfig.mjs +98 -0
- package/mjs/eslintConfig.mjs.map +1 -0
- package/mjs/index.d.ts +3 -0
- package/mjs/index.d.ts.map +1 -0
- package/mjs/index.mjs +4 -0
- package/mjs/index.mjs.map +1 -0
- package/mjs/insertPlugins.d.ts +18 -0
- package/mjs/insertPlugins.d.ts.map +1 -0
- package/mjs/insertPlugins.mjs +73 -0
- package/mjs/insertPlugins.mjs.map +1 -0
- package/mjs/semantic-release__commit-analyzer.d.mjs +2 -0
- package/mjs/semantic-release__commit-analyzer.d.mjs.map +1 -0
- package/mjs/semantic-release__exec.d.mjs +2 -0
- package/mjs/semantic-release__exec.d.mjs.map +1 -0
- package/mjs/semantic-release__git.d.mjs +2 -0
- package/mjs/semantic-release__git.d.mjs.map +1 -0
- package/mjs/semantic-release__github.d.mjs +2 -0
- package/mjs/semantic-release__github.d.mjs.map +1 -0
- package/mjs/semanticReleaseConfig.d.ts +97 -0
- package/mjs/semanticReleaseConfig.d.ts.map +1 -0
- package/mjs/semanticReleaseConfig.mjs +63 -0
- package/mjs/semanticReleaseConfig.mjs.map +1 -0
- package/mjs/semanticReleaseConfigDotnet.d.ts +109 -0
- package/mjs/semanticReleaseConfigDotnet.d.ts.map +1 -0
- package/mjs/semanticReleaseConfigDotnet.mjs +268 -0
- package/mjs/semanticReleaseConfigDotnet.mjs.map +1 -0
- package/mjs/setupGitPluginSpec.d.ts +22 -0
- package/mjs/setupGitPluginSpec.d.ts.map +1 -0
- package/mjs/setupGitPluginSpec.mjs +144 -0
- package/mjs/setupGitPluginSpec.mjs.map +1 -0
- package/mjs/utils/Exact.d.ts +20 -0
- package/mjs/utils/Exact.d.ts.map +1 -0
- package/mjs/utils/Exact.mjs +75 -0
- package/mjs/utils/Exact.mjs.map +1 -0
- package/mjs/utils/GracefulRecursion.d.mjs +2 -0
- package/mjs/utils/GracefulRecursion.d.mjs.map +1 -0
- package/mjs/utils/env.d.ts +24 -0
- package/mjs/utils/env.d.ts.map +1 -0
- package/mjs/utils/env.mjs +39 -0
- package/mjs/utils/env.mjs.map +1 -0
- package/mjs/utils/execAsync.d.ts +37 -0
- package/mjs/utils/execAsync.d.ts.map +1 -0
- package/mjs/utils/execAsync.mjs +59 -0
- package/mjs/utils/execAsync.mjs.map +1 -0
- package/mjs/utils/miscTypes.d.ts +13 -0
- package/mjs/utils/miscTypes.d.ts.map +1 -0
- package/mjs/utils/miscTypes.mjs +10 -0
- package/mjs/utils/miscTypes.mjs.map +1 -0
- package/mjs/utils/reflection/FunctionLike.d.mjs +2 -0
- package/mjs/utils/reflection/FunctionLike.d.mjs.map +1 -0
- package/mjs/utils/reflection/GetterDescriptor.d.mjs +2 -0
- package/mjs/utils/reflection/GetterDescriptor.d.mjs.map +1 -0
- package/mjs/utils/reflection/InstancePropertyDescriptorMap.d.mjs +2 -0
- package/mjs/utils/reflection/InstancePropertyDescriptorMap.d.mjs.map +1 -0
- package/mjs/utils/reflection/InstanceTypeOrSelfPropertyDescriptorMap.d.mjs +2 -0
- package/mjs/utils/reflection/InstanceTypeOrSelfPropertyDescriptorMap.d.mjs.map +1 -0
- package/mjs/utils/reflection/OwnGetterDescriptorMap.d.mjs +2 -0
- package/mjs/utils/reflection/OwnGetterDescriptorMap.d.mjs.map +1 -0
- package/mjs/utils/reflection/OwnKeyOf.d.mjs +2 -0
- package/mjs/utils/reflection/OwnKeyOf.d.mjs.map +1 -0
- package/mjs/utils/reflection/OwnPropertyDescriptorMap.d.mjs +2 -0
- package/mjs/utils/reflection/OwnPropertyDescriptorMap.d.mjs.map +1 -0
- package/mjs/utils/reflection/PropertyDescriptorMap.d.mjs +2 -0
- package/mjs/utils/reflection/PropertyDescriptorMap.d.mjs.map +1 -0
- package/mjs/utils/reflection/filterForGetters.d.ts +7 -0
- package/mjs/utils/reflection/filterForGetters.d.ts.map +1 -0
- package/mjs/utils/reflection/filterForGetters.mjs +27 -0
- package/mjs/utils/reflection/filterForGetters.mjs.map +1 -0
- package/mjs/utils/reflection/getOwnPropertyDescriptors.d.ts +22 -0
- package/mjs/utils/reflection/getOwnPropertyDescriptors.d.ts.map +1 -0
- package/mjs/utils/reflection/getOwnPropertyDescriptors.mjs +34 -0
- package/mjs/utils/reflection/getOwnPropertyDescriptors.mjs.map +1 -0
- package/mjs/utils/reflection/getOwnPropertyDescriptorsRecursively.d.ts +56 -0
- package/mjs/utils/reflection/getOwnPropertyDescriptorsRecursively.d.ts.map +1 -0
- package/mjs/utils/reflection/getOwnPropertyDescriptorsRecursively.mjs +72 -0
- package/mjs/utils/reflection/getOwnPropertyDescriptorsRecursively.mjs.map +1 -0
- package/mjs/utils/reflection/getPrototypeChainOf.d.ts +16 -0
- package/mjs/utils/reflection/getPrototypeChainOf.d.ts.map +1 -0
- package/mjs/utils/reflection/getPrototypeChainOf.mjs +55 -0
- package/mjs/utils/reflection/getPrototypeChainOf.mjs.map +1 -0
- package/mjs/utils/reflection/getPrototypeOf.d.ts +8 -0
- package/mjs/utils/reflection/getPrototypeOf.d.ts.map +1 -0
- package/mjs/utils/reflection/getPrototypeOf.mjs +10 -0
- package/mjs/utils/reflection/getPrototypeOf.mjs.map +1 -0
- package/mjs/utils/reflection/inheritance.d.ts +180 -0
- package/mjs/utils/reflection/inheritance.d.ts.map +1 -0
- package/mjs/utils/reflection/inheritance.mjs +148 -0
- package/mjs/utils/reflection/inheritance.mjs.map +1 -0
- package/mjs/utils/reflection/isConstructor.d.ts +17 -0
- package/mjs/utils/reflection/isConstructor.d.ts.map +1 -0
- package/mjs/utils/reflection/isConstructor.mjs +63 -0
- package/mjs/utils/reflection/isConstructor.mjs.map +1 -0
- package/mjs/utils/reflection/isGetterDescriptor.d.ts +9 -0
- package/mjs/utils/reflection/isGetterDescriptor.d.ts.map +1 -0
- package/mjs/utils/reflection/isGetterDescriptor.mjs +12 -0
- package/mjs/utils/reflection/isGetterDescriptor.mjs.map +1 -0
- package/mjs/utils/reflection/listOwnGetters.d.ts +26 -0
- package/mjs/utils/reflection/listOwnGetters.d.ts.map +1 -0
- package/mjs/utils/reflection/listOwnGetters.mjs +39 -0
- package/mjs/utils/reflection/listOwnGetters.mjs.map +1 -0
- package/mjs/utils/reflection.d.ts +18 -0
- package/mjs/utils/reflection.d.ts.map +1 -0
- package/mjs/utils/reflection.mjs +10 -0
- package/mjs/utils/reflection.mjs.map +1 -0
- package/package.json +17 -17
- package/src/debug.ts +5 -4
- package/src/dotnet/GithubNugetRegistryInfo.ts +17 -9
- package/src/dotnet/GitlabNugetRegistryInfo.ts +19 -5
- package/src/dotnet/IsNextVersionAlreadyPublished.cli.ts +53 -36
- package/src/dotnet/MSBuildProject.ts +150 -5
- package/src/dotnet/MSBuildProjectProperties.ts +2 -1
- package/src/dotnet/NugetProjectProperties.ts +3 -2
- package/src/dotnet/NugetRegistryInfo.ts +94 -8
- package/src/dotnet/helpers.ts +87 -53
- package/src/dotnet/index.ts +8 -0
- package/src/dotnet.ts +1 -0
- package/src/insertPlugins.ts +116 -0
- package/src/semantic-release__exec.d.ts +1 -1
- package/src/semanticReleaseConfig.ts +8 -3
- package/src/semanticReleaseConfigDotnet.ts +90 -88
- package/src/setupGitPluginSpec.ts +4 -1
- package/src/tsconfig.json +1 -1
- package/src/utils/execAsync.ts +13 -1
- package/src/utils/miscTypes.ts +4 -3
- package/src/utils/reflection/inheritance.ts +1 -1
- package/tsconfig.base.json +54 -0
- package/tsconfig.json +22 -0
- package/tsconfig.mjs.json +8 -0
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import type { Increment } from '../GracefulRecursion.js';
|
|
2
|
+
import type { Integer } from '../miscTypes.js';
|
|
3
|
+
import type { FunctionLike } from './FunctionLike.js';
|
|
4
|
+
import type { PropertyDescriptorMap } from './PropertyDescriptorMap.js';
|
|
5
|
+
/**
|
|
6
|
+
* The `[[Prototype]]` (i.e. `__proto__`) of any base class.
|
|
7
|
+
* @since 3.0.0
|
|
8
|
+
*/
|
|
9
|
+
export type BaseClassProto = (() => object) & {
|
|
10
|
+
/** @example BaseClass.__proto__.__proto__.toString() === '[object Object]' */
|
|
11
|
+
['__proto__']: ObjectConstructor['prototype'] & {
|
|
12
|
+
['__proto__']: null;
|
|
13
|
+
constructor: ObjectConstructor;
|
|
14
|
+
};
|
|
15
|
+
constructor: IBaseClass;
|
|
16
|
+
length: 0;
|
|
17
|
+
name: '';
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* The `[[Prototype]]` of all base classes.
|
|
21
|
+
* @since 3.0.0
|
|
22
|
+
*/
|
|
23
|
+
export declare const baseClassProto: BaseClassProto;
|
|
24
|
+
/**
|
|
25
|
+
* [INTERNAL]
|
|
26
|
+
* An interface representing for attaching base class properties to a class type.
|
|
27
|
+
* This kept separate from {@link BaseClass} so it can be used by {@link BaseClassProto}.
|
|
28
|
+
* @since 3.0.0
|
|
29
|
+
*/
|
|
30
|
+
interface IBaseClass {
|
|
31
|
+
/**
|
|
32
|
+
* Readable for compatibility reasons, but invisible and non-enumerable in Node.js runtime.
|
|
33
|
+
* @example BaseClass.__proto__.toString() === 'function () { [native code] }'
|
|
34
|
+
*/
|
|
35
|
+
['__proto__']: BaseClassProto;
|
|
36
|
+
constructor: FunctionConstructor & {
|
|
37
|
+
name: 'Function';
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Type a class type as a base class.
|
|
42
|
+
* Note: is `Class & ...`
|
|
43
|
+
* @since 3.0.0
|
|
44
|
+
*/
|
|
45
|
+
export type BaseClass<Class extends ConstructorConstraint<Class>> = IClass<Class> & IBaseClass;
|
|
46
|
+
/**
|
|
47
|
+
* A type representing any unknown constructor.
|
|
48
|
+
* @since 3.0.0
|
|
49
|
+
*/
|
|
50
|
+
export type Constructor_Unknown = abstract new (...args: any[]) => any;
|
|
51
|
+
/**
|
|
52
|
+
* The constraint for constructor types.
|
|
53
|
+
* This is intended for generic type constraints.
|
|
54
|
+
* For conditional return types, use `T extends Constructor<T>` instead.
|
|
55
|
+
* @template T Any newable constructor type
|
|
56
|
+
* @since 3.0.0
|
|
57
|
+
*/
|
|
58
|
+
export type ConstructorConstraint<T extends abstract new (...args: ConstructorParameters<T>) => InstanceType<T>> = abstract new (...arguments_: ConstructorParameters<T>) => InstanceType<T>;
|
|
59
|
+
/**
|
|
60
|
+
* {@link T} is a class constructor or unknown constructor. Else, `never`.
|
|
61
|
+
*
|
|
62
|
+
* Consider using {@link ClassLike} where walking the inheritance chain is necessary.
|
|
63
|
+
* @template [T=Constructor_Unknown]
|
|
64
|
+
* @since 3.0.0
|
|
65
|
+
*/
|
|
66
|
+
export type ConstructorLike<T = Constructor_Unknown> = T extends Constructor_Unknown ? T extends ConstructorConstraint<T> ? T & ConstructorConstraint<T> : T & Constructor_Unknown : never;
|
|
67
|
+
/**
|
|
68
|
+
* A type representing unknown {@link ClassLike} types.
|
|
69
|
+
* @since 3.0.0
|
|
70
|
+
*/
|
|
71
|
+
export type ClassLike_Unknown = IClass<Constructor_Unknown & WithProto<SuperClassLike | BaseClassProto>>;
|
|
72
|
+
/**
|
|
73
|
+
* A subset of {@link ProtoOrSuperClass} suitable for a class's `[[Prototype]]`
|
|
74
|
+
* @since 3.0.0
|
|
75
|
+
*/
|
|
76
|
+
export type SuperClassLike = BaseClass<Constructor_Unknown> | ClassLike_Unknown;
|
|
77
|
+
/**
|
|
78
|
+
* A terrible type. Use it if you must, but prefer other types when possible.
|
|
79
|
+
*
|
|
80
|
+
* Covers most SuperClass/Prototype types.
|
|
81
|
+
* A class that does not extend another class will satisfy {@link BaseClass}.
|
|
82
|
+
*
|
|
83
|
+
* If a type extends {@link ProtoOrSuperClass} and is `null`, you cannot get the
|
|
84
|
+
* type's keys. See {@link ./OwnKeyOf.ts}.
|
|
85
|
+
* @template [T=ReturnType<typeof Reflect.getPrototypeOf>] `null` or an `object`-like type.
|
|
86
|
+
* @since 3.0.0
|
|
87
|
+
*/
|
|
88
|
+
export type ProtoOrSuperClass<T extends object | null = ReturnType<typeof Reflect.getPrototypeOf>> = T extends null ? null : T extends object ? T extends ConstructorLike<T> ? T extends ClassLike<T & WithProto<SuperClassLike | BaseClassProto>> ? T extends BaseClass<T> ? ClassLike<BaseClass<T>> : ClassLike<T> : T extends BaseClass<T> ? BaseClass<T> : ConstructorLike<T> : T extends FunctionLike<infer FunctionConstraint> ? T extends FunctionConstraint ? FunctionLike<T> : T & FunctionLike<FunctionConstraint> : T extends object ? T & object : never : never;
|
|
89
|
+
/**
|
|
90
|
+
* The {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Inheritance_and_the_prototype_chain prototype chain} of any `object`-like type.
|
|
91
|
+
* Not to be confused with the _instance_ `.prototype` chain!
|
|
92
|
+
* ```
|
|
93
|
+
* > util.isDeepStrictEqual(Object.getOwnPropertyDescriptors({}.__proto__), Object.getOwnPropertyDescriptors(Object.prototype))
|
|
94
|
+
* true
|
|
95
|
+
* ```
|
|
96
|
+
* @template Object0 Any type with its `[[Prototype]]` attached as a `__proto__` property. The type of `__proto__` must extend {@link ProtoOrSuperClass}.
|
|
97
|
+
* @template [Limit=16]
|
|
98
|
+
* The maximum depth of recursion.
|
|
99
|
+
* Affects the maximum length of the returned type.\
|
|
100
|
+
* CAUTION: Larger values will severely degrade performance.
|
|
101
|
+
* 50 or more will trigger infinite-or-near-infinite-recursion errors.
|
|
102
|
+
* @template [CurrentLevel=0] (INTERNAL) The current depth of the prototype chain.
|
|
103
|
+
* @since 3.0.0
|
|
104
|
+
*/
|
|
105
|
+
export type ProtoChainOfObject<Object0 extends WithProto<ProtoOrSuperClass>, Limit extends Integer<number> = 16, CurrentLevel extends Integer<number> = 0> = PropertyDescriptorMap<Object0['__proto__']> extends PropertyDescriptorMap<ObjectConstructor['prototype']> ? [Object0] : Object0['__proto__'] extends WithProto<ProtoOrSuperClass> ? CurrentLevel extends Limit ? [Object0] : [
|
|
106
|
+
Object0,
|
|
107
|
+
...ProtoChainOfObject<Object0['__proto__'], Limit, Increment<CurrentLevel>>
|
|
108
|
+
] : never;
|
|
109
|
+
/**
|
|
110
|
+
* The {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Inheritance_and_the_prototype_chain prototype chain} of an object (particularly, a class).
|
|
111
|
+
* @template Class Any type with its `[[Prototype]]` attached as a `__proto__` property.
|
|
112
|
+
* The type of `__proto__` must extend {@link SuperClassLike} or {@link BaseClassProto}.
|
|
113
|
+
* @template [Limit=16]
|
|
114
|
+
* The maximum depth of recursion.
|
|
115
|
+
* Affects the maximum length of the returned type.\
|
|
116
|
+
* CAUTION: Larger values will severely degrade performance.
|
|
117
|
+
* 50 or more will trigger infinite-or-near-infinite-recursion errors.
|
|
118
|
+
* @template [CurrentLevel=0] (INTERNAL) The current depth of the prototype chain.
|
|
119
|
+
* @since 3.0.0
|
|
120
|
+
*/
|
|
121
|
+
export type ProtoChainOfClass<Class extends WithProto<SuperClassLike | BaseClassProto>, Limit extends Integer<number> = 16, CurrentLevel extends Integer<number> = 0> = Class['__proto__'] extends BaseClassProto ? [Class] : Class['__proto__'] extends SuperClassLike ? CurrentLevel extends Limit ? [Class] : [
|
|
122
|
+
Class,
|
|
123
|
+
...ProtoChainOfClass<Class['__proto__'], Limit, Increment<CurrentLevel>>
|
|
124
|
+
] : never;
|
|
125
|
+
/**
|
|
126
|
+
* The {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Inheritance_and_the_prototype_chain prototype chain} of a class instance.
|
|
127
|
+
* @template Class A constructor type with its `[[Prototype]]` attached as a `__proto__` property.
|
|
128
|
+
* @template [Limit=16]
|
|
129
|
+
* The maximum depth of recursion.
|
|
130
|
+
* Affects the maximum length of the returned type.\
|
|
131
|
+
* CAUTION: Larger values will severely degrade performance.
|
|
132
|
+
* 50 or more will trigger infinite-or-near-infinite-recursion errors.
|
|
133
|
+
* @template [CurrentLevel=0] (INTERNAL) The current depth of the prototype chain.
|
|
134
|
+
* @since 3.0.0
|
|
135
|
+
*/
|
|
136
|
+
export type ProtoChainOfClassInstance<Class extends ConstructorConstraint<Class> & WithProto<SuperClassLike | BaseClassProto>, Limit extends Integer<number> = 16, CurrentLevel extends Integer<number> = 0> = Class['__proto__'] extends BaseClassProto ? [InstanceType<Class>] : Class['__proto__'] extends SuperClassLike ? CurrentLevel extends Limit ? [InstanceType<Class>] : [
|
|
137
|
+
InstanceType<Class>,
|
|
138
|
+
...ProtoChainOfClassInstance<Class['__proto__'], Limit, Increment<CurrentLevel>>
|
|
139
|
+
] : never;
|
|
140
|
+
/**
|
|
141
|
+
* Augment a class type to expose properties not exposed by TypeScript by default.
|
|
142
|
+
* Note: is `Class & ...`
|
|
143
|
+
* @template Class The typeof any class. If the type is unknown, wrap it with {@link ConstructorConstraint}.
|
|
144
|
+
* @since 3.0.0
|
|
145
|
+
*/
|
|
146
|
+
export type IClass<Class extends ConstructorConstraint<Class>> = Class & {
|
|
147
|
+
prototype: InstanceType<Class>;
|
|
148
|
+
name: ConstructorConstraint<Class>['name'];
|
|
149
|
+
length: ConstructorConstraint<Class>['length'];
|
|
150
|
+
};
|
|
151
|
+
/**
|
|
152
|
+
* A more fleshed-out Class type.
|
|
153
|
+
*
|
|
154
|
+
* Note: is `Class & ...`
|
|
155
|
+
*
|
|
156
|
+
* In addition to the Constructor constraint, this type...
|
|
157
|
+
* - Sets the type of the immediate superclass.
|
|
158
|
+
* - Sets `prototype` to {@link InstanceType}
|
|
159
|
+
* @template Class The `typeof MyClass`. If this class extends a class, pass `typeof MySuperClass` to the generic argument {@link Class}.
|
|
160
|
+
* @example
|
|
161
|
+
* type Class_MyClass = ClassLike<typeof MyClass & WithProto<BaseClass<typeof MyBaseClass>>;
|
|
162
|
+
* @since 3.0.0
|
|
163
|
+
*/
|
|
164
|
+
export type ClassLike<Class extends ConstructorConstraint<Class> & WithProto<SuperClassLike | BaseClassProto>> = Class extends BaseClass<Class> ? Class : Class['__proto__'] extends BaseClassProto ? BaseClass<Class> : Class['__proto__'] extends ConstructorLike<Class['__proto__']> ? IClass<Class> & WithProto<ConstructorLike<Class['__proto__']>> : IClass<Class>;
|
|
165
|
+
/**
|
|
166
|
+
* If {@link T} is a class or constructor, {@link InstanceType}<{@link T}>. Else, {@link T}.
|
|
167
|
+
* @template T `null` or any `object`-like type.
|
|
168
|
+
* @since 3.0.0
|
|
169
|
+
*/
|
|
170
|
+
export type InstanceTypeOrSelf<T extends object | null> = T extends ConstructorLike ? T extends ConstructorLike<T> ? InstanceType<T> : T : T;
|
|
171
|
+
/**
|
|
172
|
+
* Interface for attaching a `__proto__` to an object e.g. `T0 & WithProto<T1>`
|
|
173
|
+
* @template __proto__ the type of the an object's `[[Prototype]]`.
|
|
174
|
+
* @since 3.0.0
|
|
175
|
+
*/
|
|
176
|
+
export interface WithProto<__proto__ extends ProtoOrSuperClass> {
|
|
177
|
+
['__proto__']: __proto__;
|
|
178
|
+
}
|
|
179
|
+
export {};
|
|
180
|
+
//# sourceMappingURL=inheritance.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inheritance.d.ts","sourceRoot":"","sources":["../../../src/utils/reflection/inheritance.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { getPrototypeOf } from './getPrototypeOf.mjs';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The `[[Prototype]]` (i.e. `__proto__`) of any base class.
|
|
5
|
+
* @since 3.0.0
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* The `[[Prototype]]` of all base classes.
|
|
10
|
+
* @since 3.0.0
|
|
11
|
+
*/
|
|
12
|
+
const baseClassProto = getPrototypeOf(Object);
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* [INTERNAL]
|
|
16
|
+
* An interface representing for attaching base class properties to a class type.
|
|
17
|
+
* This kept separate from {@link BaseClass} so it can be used by {@link BaseClassProto}.
|
|
18
|
+
* @since 3.0.0
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Type a class type as a base class.
|
|
23
|
+
* Note: is `Class & ...`
|
|
24
|
+
* @since 3.0.0
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* A type representing any unknown constructor.
|
|
29
|
+
* @since 3.0.0
|
|
30
|
+
*/
|
|
31
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* The constraint for constructor types.
|
|
35
|
+
* This is intended for generic type constraints.
|
|
36
|
+
* For conditional return types, use `T extends Constructor<T>` instead.
|
|
37
|
+
* @template T Any newable constructor type
|
|
38
|
+
* @since 3.0.0
|
|
39
|
+
*/
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* {@link T} is a class constructor or unknown constructor. Else, `never`.
|
|
43
|
+
*
|
|
44
|
+
* Consider using {@link ClassLike} where walking the inheritance chain is necessary.
|
|
45
|
+
* @template [T=Constructor_Unknown]
|
|
46
|
+
* @since 3.0.0
|
|
47
|
+
*/
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* A type representing unknown {@link ClassLike} types.
|
|
51
|
+
* @since 3.0.0
|
|
52
|
+
*/
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* A subset of {@link ProtoOrSuperClass} suitable for a class's `[[Prototype]]`
|
|
56
|
+
* @since 3.0.0
|
|
57
|
+
*/
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* A terrible type. Use it if you must, but prefer other types when possible.
|
|
61
|
+
*
|
|
62
|
+
* Covers most SuperClass/Prototype types.
|
|
63
|
+
* A class that does not extend another class will satisfy {@link BaseClass}.
|
|
64
|
+
*
|
|
65
|
+
* If a type extends {@link ProtoOrSuperClass} and is `null`, you cannot get the
|
|
66
|
+
* type's keys. See {@link ./OwnKeyOf.ts}.
|
|
67
|
+
* @template [T=ReturnType<typeof Reflect.getPrototypeOf>] `null` or an `object`-like type.
|
|
68
|
+
* @since 3.0.0
|
|
69
|
+
*/
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* The {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Inheritance_and_the_prototype_chain prototype chain} of any `object`-like type.
|
|
73
|
+
* Not to be confused with the _instance_ `.prototype` chain!
|
|
74
|
+
* ```
|
|
75
|
+
* > util.isDeepStrictEqual(Object.getOwnPropertyDescriptors({}.__proto__), Object.getOwnPropertyDescriptors(Object.prototype))
|
|
76
|
+
* true
|
|
77
|
+
* ```
|
|
78
|
+
* @template Object0 Any type with its `[[Prototype]]` attached as a `__proto__` property. The type of `__proto__` must extend {@link ProtoOrSuperClass}.
|
|
79
|
+
* @template [Limit=16]
|
|
80
|
+
* The maximum depth of recursion.
|
|
81
|
+
* Affects the maximum length of the returned type.\
|
|
82
|
+
* CAUTION: Larger values will severely degrade performance.
|
|
83
|
+
* 50 or more will trigger infinite-or-near-infinite-recursion errors.
|
|
84
|
+
* @template [CurrentLevel=0] (INTERNAL) The current depth of the prototype chain.
|
|
85
|
+
* @since 3.0.0
|
|
86
|
+
*/
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* The {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Inheritance_and_the_prototype_chain prototype chain} of an object (particularly, a class).
|
|
90
|
+
* @template Class Any type with its `[[Prototype]]` attached as a `__proto__` property.
|
|
91
|
+
* The type of `__proto__` must extend {@link SuperClassLike} or {@link BaseClassProto}.
|
|
92
|
+
* @template [Limit=16]
|
|
93
|
+
* The maximum depth of recursion.
|
|
94
|
+
* Affects the maximum length of the returned type.\
|
|
95
|
+
* CAUTION: Larger values will severely degrade performance.
|
|
96
|
+
* 50 or more will trigger infinite-or-near-infinite-recursion errors.
|
|
97
|
+
* @template [CurrentLevel=0] (INTERNAL) The current depth of the prototype chain.
|
|
98
|
+
* @since 3.0.0
|
|
99
|
+
*/
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* The {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Inheritance_and_the_prototype_chain prototype chain} of a class instance.
|
|
103
|
+
* @template Class A constructor type with its `[[Prototype]]` attached as a `__proto__` property.
|
|
104
|
+
* @template [Limit=16]
|
|
105
|
+
* The maximum depth of recursion.
|
|
106
|
+
* Affects the maximum length of the returned type.\
|
|
107
|
+
* CAUTION: Larger values will severely degrade performance.
|
|
108
|
+
* 50 or more will trigger infinite-or-near-infinite-recursion errors.
|
|
109
|
+
* @template [CurrentLevel=0] (INTERNAL) The current depth of the prototype chain.
|
|
110
|
+
* @since 3.0.0
|
|
111
|
+
*/
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Augment a class type to expose properties not exposed by TypeScript by default.
|
|
115
|
+
* Note: is `Class & ...`
|
|
116
|
+
* @template Class The typeof any class. If the type is unknown, wrap it with {@link ConstructorConstraint}.
|
|
117
|
+
* @since 3.0.0
|
|
118
|
+
*/
|
|
119
|
+
// defined as `type` because interfaces cannot extend their generic parameters
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* A more fleshed-out Class type.
|
|
123
|
+
*
|
|
124
|
+
* Note: is `Class & ...`
|
|
125
|
+
*
|
|
126
|
+
* In addition to the Constructor constraint, this type...
|
|
127
|
+
* - Sets the type of the immediate superclass.
|
|
128
|
+
* - Sets `prototype` to {@link InstanceType}
|
|
129
|
+
* @template Class The `typeof MyClass`. If this class extends a class, pass `typeof MySuperClass` to the generic argument {@link Class}.
|
|
130
|
+
* @example
|
|
131
|
+
* type Class_MyClass = ClassLike<typeof MyClass & WithProto<BaseClass<typeof MyBaseClass>>;
|
|
132
|
+
* @since 3.0.0
|
|
133
|
+
*/
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* If {@link T} is a class or constructor, {@link InstanceType}<{@link T}>. Else, {@link T}.
|
|
137
|
+
* @template T `null` or any `object`-like type.
|
|
138
|
+
* @since 3.0.0
|
|
139
|
+
*/
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Interface for attaching a `__proto__` to an object e.g. `T0 & WithProto<T1>`
|
|
143
|
+
* @template __proto__ the type of the an object's `[[Prototype]]`.
|
|
144
|
+
* @since 3.0.0
|
|
145
|
+
*/
|
|
146
|
+
|
|
147
|
+
export { baseClassProto };
|
|
148
|
+
//# sourceMappingURL=inheritance.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inheritance.mjs","sources":["../../../src/utils/reflection/inheritance.ts"],"sourcesContent":null,"names":[],"mappings":";;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACY,MAAC,cAAc,GAAG,cAAc,CAAC,MAAM;;AAEnD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;;"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A very jank function to determine if an object can be the target of Reflect.construct.
|
|
3
|
+
* Unfortunately, many functions have a constructor in their prototype. These
|
|
4
|
+
* functions are treated like classes due to JavaScript's poor distinction between
|
|
5
|
+
* classes and functions.\
|
|
6
|
+
* Typescript can enforce "new" keyword usage, but overriding the type
|
|
7
|
+
* allows you to `new isConstructor()` despite this function not intended to be
|
|
8
|
+
* used with the `new` keyword.
|
|
9
|
+
* #### NOTE: Only works when targeting ES6/ES2015 or later.
|
|
10
|
+
* > If your project or a dependent project is compiled to < ES6, this function will always return `false`; classes and constructors were introduced in ES6/ES2015.
|
|
11
|
+
* @param obj Anything.
|
|
12
|
+
* @returns `true` if the obj is a constructor. Else, `false`.
|
|
13
|
+
* @since 3.0.0
|
|
14
|
+
* @see https://stackoverflow.com/a/49510834
|
|
15
|
+
*/
|
|
16
|
+
export declare function isConstructor(obj: unknown): obj is abstract new (...args: any[]) => any;
|
|
17
|
+
//# sourceMappingURL=isConstructor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isConstructor.d.ts","sourceRoot":"","sources":["../../../src/utils/reflection/isConstructor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,wBAAgB,aAAa,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,QAAQ,MAAM,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAyDvF"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A very jank function to determine if an object can be the target of Reflect.construct.
|
|
3
|
+
* Unfortunately, many functions have a constructor in their prototype. These
|
|
4
|
+
* functions are treated like classes due to JavaScript's poor distinction between
|
|
5
|
+
* classes and functions.\
|
|
6
|
+
* Typescript can enforce "new" keyword usage, but overriding the type
|
|
7
|
+
* allows you to `new isConstructor()` despite this function not intended to be
|
|
8
|
+
* used with the `new` keyword.
|
|
9
|
+
* #### NOTE: Only works when targeting ES6/ES2015 or later.
|
|
10
|
+
* > If your project or a dependent project is compiled to < ES6, this function will always return `false`; classes and constructors were introduced in ES6/ES2015.
|
|
11
|
+
* @param obj Anything.
|
|
12
|
+
* @returns `true` if the obj is a constructor. Else, `false`.
|
|
13
|
+
* @since 3.0.0
|
|
14
|
+
* @see https://stackoverflow.com/a/49510834
|
|
15
|
+
*/
|
|
16
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
17
|
+
function isConstructor(obj) {
|
|
18
|
+
// Method 0 - filter
|
|
19
|
+
if (typeof obj !== 'function') return false;
|
|
20
|
+
|
|
21
|
+
// Method 1
|
|
22
|
+
// statically-defined class
|
|
23
|
+
if (/^class\s/.test(obj.toString())) return true;
|
|
24
|
+
|
|
25
|
+
/* Method 2
|
|
26
|
+
* > class class_ {}; function func(){}
|
|
27
|
+
* undefined
|
|
28
|
+
* > class_.prototype.constructor.name === class_.name
|
|
29
|
+
* true
|
|
30
|
+
* > func.prototype?.constructor?.name === func.name
|
|
31
|
+
* false
|
|
32
|
+
* typeof String.prototype ==='object'
|
|
33
|
+
* > true
|
|
34
|
+
* typeof Function.prototype === 'object';
|
|
35
|
+
* > false
|
|
36
|
+
* typeof Function.prototype
|
|
37
|
+
* > 'function'
|
|
38
|
+
*/
|
|
39
|
+
const prototype = obj.prototype;
|
|
40
|
+
if ((typeof prototype === 'object' || typeof prototype === 'function') && prototype !== null && 'constructor' in prototype && typeof prototype.constructor === 'function') {
|
|
41
|
+
const _ctor = prototype.constructor;
|
|
42
|
+
const _name = Reflect.getOwnPropertyDescriptor(_ctor, 'name');
|
|
43
|
+
// short-circuit if `obj.prototype.constructor` is a function, but not a constructor. Return false.
|
|
44
|
+
return _ctor === obj && _name?.writable === false && _name.enumerable === false && _name.configurable === true;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// Short-circuit
|
|
48
|
+
// Method 3 catches exceptions when !isConstructor. When debugging, that's annoying.
|
|
49
|
+
return false;
|
|
50
|
+
|
|
51
|
+
// Method 3
|
|
52
|
+
// isConstructable (See https://stackoverflow.com/a/49510834)
|
|
53
|
+
// try {
|
|
54
|
+
// // @ts-expect-error ts(2351): Type 'Function' has no construct signatures.
|
|
55
|
+
// new new Proxy(obj, { construct: () => ({}) })()
|
|
56
|
+
// return true
|
|
57
|
+
// }
|
|
58
|
+
// catch {
|
|
59
|
+
// return false
|
|
60
|
+
// }
|
|
61
|
+
}
|
|
62
|
+
export { isConstructor };
|
|
63
|
+
//# sourceMappingURL=isConstructor.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isConstructor.mjs","sources":["../../../src/utils/reflection/isConstructor.ts"],"sourcesContent":null,"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,aAAa,CAAC,GAAG,EAAE;AACnC;AACA,EAAE,IAAI,OAAO,GAAG,KAAK,UAAU,EAAE,OAAO,KAAK;;AAE7C;AACA;AACA,EAAE,IAAI,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,EAAE,OAAO,IAAI;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE,MAAM,SAAS,GAAG,GAAG,CAAC,SAAS;AACjC,EAAE,IAAI,CAAC,OAAO,SAAS,KAAK,QAAQ,IAAI,OAAO,SAAS,KAAK,UAAU,KAAK,SAAS,KAAK,IAAI,IAAI,aAAa,IAAI,SAAS,IAAI,OAAO,SAAS,CAAC,WAAW,KAAK,UAAU,EAAE;AAC7K,IAAI,MAAM,KAAK,GAAG,SAAS,CAAC,WAAW;AACvC,IAAI,MAAM,KAAK,GAAG,OAAO,CAAC,wBAAwB,CAAC,KAAK,EAAE,MAAM,CAAC;AACjE;AACA,IAAI,OAAO,KAAK,KAAK,GAAG,IAAI,KAAK,EAAE,QAAQ,KAAK,KAAK,IAAI,KAAK,CAAC,UAAU,KAAK,KAAK,IAAI,KAAK,CAAC,YAAY,KAAK,IAAI;AAClH;;AAEA;AACA;AACA,EAAE,OAAO,KAAK;;AAEd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { GetterDescriptor } from './GetterDescriptor.js';
|
|
2
|
+
/**
|
|
3
|
+
* A function for inferring a {@link TypedPropertyDescriptor} is a {@link GetterDescriptor}
|
|
4
|
+
* @param propertyDescriptor The {@link TypedPropertyDescriptor} to inspect.
|
|
5
|
+
* @returns `true` if {@link propertyDescriptor} describes a getter. Else, `false.
|
|
6
|
+
* @since 3.0.0
|
|
7
|
+
*/
|
|
8
|
+
export declare function isGetterDescriptor<T>(propertyDescriptor: TypedPropertyDescriptor<T>): propertyDescriptor is GetterDescriptor<T>;
|
|
9
|
+
//# sourceMappingURL=isGetterDescriptor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isGetterDescriptor.d.ts","sourceRoot":"","sources":["../../../src/utils/reflection/isGetterDescriptor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAE9D;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,kBAAkB,EAAE,uBAAuB,CAAC,CAAC,CAAC,GAAG,kBAAkB,IAAI,gBAAgB,CAAC,CAAC,CAAC,CAE/H"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A function for inferring a {@link TypedPropertyDescriptor} is a {@link GetterDescriptor}
|
|
3
|
+
* @param propertyDescriptor The {@link TypedPropertyDescriptor} to inspect.
|
|
4
|
+
* @returns `true` if {@link propertyDescriptor} describes a getter. Else, `false.
|
|
5
|
+
* @since 3.0.0
|
|
6
|
+
*/
|
|
7
|
+
function isGetterDescriptor(propertyDescriptor) {
|
|
8
|
+
return typeof propertyDescriptor.get === 'function';
|
|
9
|
+
}
|
|
10
|
+
;
|
|
11
|
+
export { isGetterDescriptor };
|
|
12
|
+
//# sourceMappingURL=isGetterDescriptor.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isGetterDescriptor.mjs","sources":["../../../src/utils/reflection/isGetterDescriptor.ts"],"sourcesContent":null,"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,kBAAkB,CAAC,kBAAkB,EAAE;AACvD,EAAE,OAAO,OAAO,kBAAkB,CAAC,GAAG,KAAK,UAAU;AACrD;AACA;;;;"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { InstanceOrStatic } from '../miscTypes.js';
|
|
2
|
+
import type { BaseClassProto, ClassLike, ConstructorConstraint, InstanceTypeOrSelf, SuperClassLike, WithProto } from './inheritance.js';
|
|
3
|
+
/**
|
|
4
|
+
* Description placeholder
|
|
5
|
+
* @template {ClassLike<ConstructorConstraint<Class> & WithProto<SuperClassLike | BaseClassProto>>} Class
|
|
6
|
+
* @template {InstanceOrStatic} _InstanceOrStatic
|
|
7
|
+
* @since 3.0.0
|
|
8
|
+
*/
|
|
9
|
+
type OwnGetters<Class extends ClassLike<ConstructorConstraint<Class> & WithProto<SuperClassLike | BaseClassProto>>, _InstanceOrStatic extends InstanceOrStatic> = [_InstanceOrStatic] extends ['Instance'] ? Exclude<(Class['__proto__'] extends BaseClassProto ? null : InstanceTypeOrSelf<Class['__proto__']>) extends null ? keyof InstanceType<Class> : Exclude<keyof InstanceType<Class>, keyof (Class['__proto__'] extends BaseClassProto ? null : InstanceTypeOrSelf<Class['__proto__']>)>, '__proto__'>[] : [_InstanceOrStatic] extends ['Static'] ? Exclude<Class['__proto__'] extends null ? keyof Class : Exclude<keyof Class, keyof Class['__proto__']>, '__proto__'>[] : never;
|
|
10
|
+
/**
|
|
11
|
+
* # !WARNING!
|
|
12
|
+
* > If you don't specify the Class's SuperClass (or `BaseClassProto`) via WithProto, the return type will wrongly include inherited property names! This is a design limitation of TypeScript.
|
|
13
|
+
*
|
|
14
|
+
* Returns the names of the instantiated (or static), noninherited getters derived from the
|
|
15
|
+
* given prototype or prototype of the given object.
|
|
16
|
+
* @template {ClassLike<ConstructorConstraint<Class> & WithProto<SuperClassLike | BaseClassProto>>} Class
|
|
17
|
+
* @template {InstanceOrStatic} _InstanceOrStatic 'Instance' or 'Static'. Determines the return type.
|
|
18
|
+
* @param classDefinition Any class cast to ClassLike
|
|
19
|
+
* @param instanceOrStatic 'Instance' or 'Static'. Determines the return type.
|
|
20
|
+
* @since 3.0.0
|
|
21
|
+
* @returns
|
|
22
|
+
* An array of names of getters that were not inherited from a parent class. If {@link classDefinition} is a class instance, the names of instanced getters are returned. Otherwise, the names of static getters are returned;
|
|
23
|
+
*/
|
|
24
|
+
export declare function listOwnGetters<Class extends ClassLike<ConstructorConstraint<Class> & WithProto<SuperClassLike | BaseClassProto>>, _InstanceOrStatic extends InstanceOrStatic>(classDefinition: Class, instanceOrStatic: Extract<_InstanceOrStatic, InstanceOrStatic>): OwnGetters<Class, _InstanceOrStatic>;
|
|
25
|
+
export {};
|
|
26
|
+
//# sourceMappingURL=listOwnGetters.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"listOwnGetters.d.ts","sourceRoot":"","sources":["../../../src/utils/reflection/listOwnGetters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAGxD,OAAO,KAAK,EACV,cAAc,EACd,SAAS,EACT,qBAAqB,EACrB,kBAAkB,EAClB,cAAc,EACd,SAAS,EACV,MAAM,kBAAkB,CAAC;AAI1B;;;;;GAKG;AACH,KAAK,UAAU,CACb,KAAK,SAAS,SAAS,CAAC,qBAAqB,CAAC,KAAK,CAAC,GAAG,SAAS,CAAC,cAAc,GAAG,cAAc,CAAC,CAAC,EAClG,iBAAiB,SAAS,gBAAgB,IAExC,CAAC,iBAAiB,CAAC,SAAS,CAAC,UAAU,CAAC,GACtC,OAAO,CACP,CAAC,KAAK,CAAC,WAAW,CAAC,SAAS,cAAc,GAAG,IAAI,GAAG,kBAAkB,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,IAAI,GACpG,MAAM,YAAY,CAAC,KAAK,CAAC,GACzB,OAAO,CACP,MAAM,YAAY,CAAC,KAAK,CAAC,EACzB,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,SAAS,cAAc,GAAG,IAAI,GAAG,kBAAkB,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAClG,EACH,WAAW,CACZ,EAAE,GACD,CAAC,iBAAiB,CAAC,SAAS,CAAC,QAAQ,CAAC,GAClC,OAAO,CACP,KAAK,CAAC,WAAW,CAAC,SAAS,IAAI,GAAG,MAAM,KAAK,GAAG,OAAO,CAAC,MAAM,KAAK,EAAE,MAAM,KAAK,CAAC,WAAW,CAAC,CAAC,EAC9F,WAAW,CACZ,EAAE,GACD,KAAK,CAAC;AAEhB;;;;;;;;;;;;;GAaG;AACH,wBAAgB,cAAc,CAC5B,KAAK,SAAS,SAAS,CAAC,qBAAqB,CAAC,KAAK,CAAC,GAAG,SAAS,CAAC,cAAc,GAAG,cAAc,CAAC,CAAC,EAClG,iBAAiB,SAAS,gBAAgB,EAE1C,eAAe,EAAE,KAAK,EACtB,gBAAgB,EAAE,OAAO,CAAC,iBAAiB,EAAE,gBAAgB,CAAC,GAC7D,UAAU,CAAC,KAAK,EAAE,iBAAiB,CAAC,CAkBtC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { filterForGetters } from './filterForGetters.mjs';
|
|
2
|
+
import { getOwnPropertyDescriptors } from './getOwnPropertyDescriptors.mjs';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Description placeholder
|
|
6
|
+
* @template {ClassLike<ConstructorConstraint<Class> & WithProto<SuperClassLike | BaseClassProto>>} Class
|
|
7
|
+
* @template {InstanceOrStatic} _InstanceOrStatic
|
|
8
|
+
* @since 3.0.0
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* # !WARNING!
|
|
13
|
+
* > If you don't specify the Class's SuperClass (or `BaseClassProto`) via WithProto, the return type will wrongly include inherited property names! This is a design limitation of TypeScript.
|
|
14
|
+
*
|
|
15
|
+
* Returns the names of the instantiated (or static), noninherited getters derived from the
|
|
16
|
+
* given prototype or prototype of the given object.
|
|
17
|
+
* @template {ClassLike<ConstructorConstraint<Class> & WithProto<SuperClassLike | BaseClassProto>>} Class
|
|
18
|
+
* @template {InstanceOrStatic} _InstanceOrStatic 'Instance' or 'Static'. Determines the return type.
|
|
19
|
+
* @param classDefinition Any class cast to ClassLike
|
|
20
|
+
* @param instanceOrStatic 'Instance' or 'Static'. Determines the return type.
|
|
21
|
+
* @since 3.0.0
|
|
22
|
+
* @returns
|
|
23
|
+
* An array of names of getters that were not inherited from a parent class. If {@link classDefinition} is a class instance, the names of instanced getters are returned. Otherwise, the names of static getters are returned;
|
|
24
|
+
*/
|
|
25
|
+
function listOwnGetters(classDefinition, instanceOrStatic) {
|
|
26
|
+
if (instanceOrStatic === 'Instance') {
|
|
27
|
+
const descriptorMap = getOwnPropertyDescriptors(classDefinition, instanceOrStatic);
|
|
28
|
+
const getterDescriptorMap = filterForGetters(descriptorMap);
|
|
29
|
+
const keyArray = Reflect.ownKeys(getterDescriptorMap);
|
|
30
|
+
return keyArray;
|
|
31
|
+
} else if (instanceOrStatic === 'Static') {
|
|
32
|
+
const descriptorMap = getOwnPropertyDescriptors(classDefinition, instanceOrStatic);
|
|
33
|
+
const getterDescriptorMap = filterForGetters(descriptorMap);
|
|
34
|
+
const keyArray = Reflect.ownKeys(getterDescriptorMap);
|
|
35
|
+
return keyArray;
|
|
36
|
+
} else throw new TypeError('Argument `instanceOrStatic` must be "Instance" or "Static".');
|
|
37
|
+
}
|
|
38
|
+
export { listOwnGetters };
|
|
39
|
+
//# sourceMappingURL=listOwnGetters.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"listOwnGetters.mjs","sources":["../../../src/utils/reflection/listOwnGetters.ts"],"sourcesContent":null,"names":[],"mappings":";;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,cAAc,CAAC,eAAe,EAAE,gBAAgB,EAAE;AAClE,EAAE,IAAI,gBAAgB,KAAK,UAAU,EAAE;AACvC,IAAI,MAAM,aAAa,GAAG,yBAAyB,CAAC,eAAe,EAAE,gBAAgB,CAAC;AACtF,IAAI,MAAM,mBAAmB,GAAG,gBAAgB,CAAC,aAAa,CAAC;AAC/D,IAAI,MAAM,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC,mBAAmB,CAAC;AACzD,IAAI,OAAO,QAAQ;AACnB,GAAG,MAAM,IAAI,gBAAgB,KAAK,QAAQ,EAAE;AAC5C,IAAI,MAAM,aAAa,GAAG,yBAAyB,CAAC,eAAe,EAAE,gBAAgB,CAAC;AACtF,IAAI,MAAM,mBAAmB,GAAG,gBAAgB,CAAC,aAAa,CAAC;AAC/D,IAAI,MAAM,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC,mBAAmB,CAAC;AACzD,IAAI,OAAO,QAAQ;AACnB,GAAG,MAAM,MAAM,IAAI,SAAS,CAAC,6DAA6D,CAAC;AAC3F;;;;"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export type * from './reflection/FunctionLike.js';
|
|
2
|
+
export type * from './reflection/GetterDescriptor.js';
|
|
3
|
+
export type * from './reflection/InstancePropertyDescriptorMap.js';
|
|
4
|
+
export type * from './reflection/InstanceTypeOrSelfPropertyDescriptorMap.js';
|
|
5
|
+
export type * from './reflection/OwnGetterDescriptorMap.js';
|
|
6
|
+
export type * from './reflection/OwnKeyOf.js';
|
|
7
|
+
export type * from './reflection/OwnPropertyDescriptorMap.js';
|
|
8
|
+
export type * from './reflection/PropertyDescriptorMap.js';
|
|
9
|
+
export * from './reflection/filterForGetters.js';
|
|
10
|
+
export * from './reflection/getOwnPropertyDescriptors.js';
|
|
11
|
+
export * from './reflection/getOwnPropertyDescriptorsRecursively.js';
|
|
12
|
+
export * from './reflection/getPrototypeChainOf.js';
|
|
13
|
+
export * from './reflection/getPrototypeOf.js';
|
|
14
|
+
export * from './reflection/inheritance.js';
|
|
15
|
+
export * from './reflection/isConstructor.js';
|
|
16
|
+
export * from './reflection/isGetterDescriptor.js';
|
|
17
|
+
export * from './reflection/listOwnGetters.js';
|
|
18
|
+
//# sourceMappingURL=reflection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reflection.d.ts","sourceRoot":"","sources":["../../src/utils/reflection.ts"],"names":[],"mappings":"AAAA,mBAAmB,8BAA8B,CAAC;AAClD,mBAAmB,kCAAkC,CAAC;AACtD,mBAAmB,+CAA+C,CAAC;AACnE,mBAAmB,yDAAyD,CAAC;AAC7E,mBAAmB,wCAAwC,CAAC;AAC5D,mBAAmB,0BAA0B,CAAC;AAC9C,mBAAmB,0CAA0C,CAAC;AAC9D,mBAAmB,uCAAuC,CAAC;AAE3D,cAAc,kCAAkC,CAAC;AACjD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,sDAAsD,CAAC;AACrE,cAAc,qCAAqC,CAAC;AACpD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,oCAAoC,CAAC;AACnD,cAAc,gCAAgC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { filterForGetters } from './reflection/filterForGetters.mjs';
|
|
2
|
+
export { getOwnPropertyDescriptors } from './reflection/getOwnPropertyDescriptors.mjs';
|
|
3
|
+
export { getOwnPropertyDescriptorsRecursively } from './reflection/getOwnPropertyDescriptorsRecursively.mjs';
|
|
4
|
+
export { getPrototypesChainOf } from './reflection/getPrototypeChainOf.mjs';
|
|
5
|
+
export { getPrototypeOf } from './reflection/getPrototypeOf.mjs';
|
|
6
|
+
export { baseClassProto } from './reflection/inheritance.mjs';
|
|
7
|
+
export { isConstructor } from './reflection/isConstructor.mjs';
|
|
8
|
+
export { isGetterDescriptor } from './reflection/isGetterDescriptor.mjs';
|
|
9
|
+
export { listOwnGetters } from './reflection/listOwnGetters.mjs';
|
|
10
|
+
//# sourceMappingURL=reflection.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reflection.mjs","sources":[],"sourcesContent":null,"names":[],"mappings":";;;;;;;;"}
|