mnemonica 0.9.958 → 0.9.959
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/build/index.d.ts +7 -8
- package/package.json +1 -1
package/build/index.d.ts
CHANGED
|
@@ -2,25 +2,24 @@ import { TypeLookup, IDEF } from './types';
|
|
|
2
2
|
export type { IDEF } from './types';
|
|
3
3
|
export declare const defaultTypes: any;
|
|
4
4
|
type Proto<P, T> = Pick<P, Exclude<keyof P, keyof T>> & T;
|
|
5
|
-
type RN = Record<string | symbol, unknown>;
|
|
6
5
|
type SN = Record<string, new () => unknown>;
|
|
7
|
-
interface IDefinitorInstance<N extends
|
|
6
|
+
interface IDefinitorInstance<N extends object, S> {
|
|
8
7
|
new (): {
|
|
9
8
|
[key in keyof S]: S[key];
|
|
10
9
|
};
|
|
11
10
|
define: IDefinitor<N, string>;
|
|
12
11
|
}
|
|
13
|
-
interface IDefinitor<P extends
|
|
14
|
-
<PP extends object, T
|
|
12
|
+
interface IDefinitor<P extends object, SubTypeName extends string> {
|
|
13
|
+
<PP extends object, T, M extends Proto<P, Proto<PP, T>>, S extends SN & M>(this: unknown, TypeName: SubTypeName, constructHandler: IDEF<T>, proto?: PP, config?: object): IDefinitorInstance<M, S>;
|
|
15
14
|
}
|
|
16
|
-
export declare const define: <T
|
|
15
|
+
export declare const define: <T, P extends object, N extends Proto<P, T>, SubTypeName extends string, S extends SN & N, R extends {
|
|
17
16
|
new (): { [key in keyof S]: S[key]; };
|
|
18
17
|
define: IDefinitor<N, SubTypeName>;
|
|
19
18
|
}>(this: unknown, TypeName?: string, constructHandler?: IDEF<T> | undefined, proto?: P | undefined, config?: {}) => R;
|
|
20
19
|
export declare const lookup: TypeLookup;
|
|
21
|
-
export declare const apply: <E extends
|
|
22
|
-
export declare const call: <E extends
|
|
23
|
-
export declare const bind: <E extends
|
|
20
|
+
export declare const apply: <E extends object, T extends object, S extends Proto<E, T>>(entity: E, Constructor: IDEF<T>, args?: unknown[]) => { [key in keyof S]: S[key]; };
|
|
21
|
+
export declare const call: <E extends object, T extends object, S extends Proto<E, T>>(entity: E, Constructor: IDEF<T>, ...args: unknown[]) => { [key in keyof S]: S[key]; };
|
|
22
|
+
export declare const bind: <E extends object, T extends object, S extends Proto<E, T>>(entity: E, Constructor: IDEF<T>) => (...args: unknown[]) => { [key in keyof S]: S[key]; };
|
|
24
23
|
export declare const mnemonica: {
|
|
25
24
|
[index: string]: unknown;
|
|
26
25
|
};
|