1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 | declare global {
|
8 | interface Function {
|
9 | __wrapped?: boolean | undefined;
|
10 | }
|
11 | }
|
12 |
|
13 | declare const shimmer: {
|
14 | (options: { logger?(msg: string): void }): void;
|
15 | wrap<Nodule extends object, FieldName extends keyof Nodule>(
|
16 | nodule: Nodule,
|
17 | name: FieldName,
|
18 | wrapper: (original: Nodule[FieldName]) => Nodule[FieldName]
|
19 | ): void;
|
20 | massWrap<Nodule extends object, FieldName extends keyof Nodule>(
|
21 | nodules: Nodule[],
|
22 | names: FieldName[],
|
23 | wrapper: (original: Nodule[FieldName]) => Nodule[FieldName]
|
24 | ): void;
|
25 | unwrap<Nodule extends object>(
|
26 | nodule: Nodule,
|
27 | name: keyof Nodule
|
28 | ): void;
|
29 | massUnwrap<Nodule extends object>(
|
30 | nodules: Nodule[],
|
31 | names: Array<keyof Nodule>
|
32 | ): void;
|
33 | };
|
34 |
|
35 | export = shimmer;
|