@rocketmakers/ioc 0.2.4 → 0.2.6

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/README.md CHANGED
@@ -14,7 +14,11 @@ You should first create a type that describes your Container items, then create
14
14
 
15
15
  `service/admin.ts`
16
16
  ```TypeScript
17
- export class AdminService {}
17
+ export class AdminService {
18
+ doSomething(value: number) {
19
+ return Math.round(value);
20
+ }
21
+ }
18
22
 
19
23
  ```
20
24
 
@@ -30,11 +34,11 @@ export class AdminController {
30
34
 
31
35
  `service/external-api.ts`
32
36
  ```TypeScript
33
- import { fetchUser, IUser } from './external';
37
+ import { fetchUserData, IUser } from './external';
34
38
 
35
39
  // NOTE: we want the apiKey param to be provided (curried) from the container - so we never need to explicitly pass this when consuming this function!
36
- export function getExternalData(apiKey: string, id: number): IUser {
37
- return fetchUser(apiKey, id);
40
+ export function getExternalUserData(apiKey: string, id: number): IUser {
41
+ return fetchUserData(apiKey, id);
38
42
  }
39
43
 
40
44
  ```
@@ -42,15 +46,17 @@ export function getExternalData(apiKey: string, id: number): IUser {
42
46
  ```TypeScript
43
47
  import { Curried1 } from '@rocketmakers/ioc';
44
48
 
49
+ // Application Types
45
50
  import type { AdminController } from '../controller/admin';
46
51
  import type { AdminService } from '../service/admin';
47
- import type { getExternalData } from '../service/external-api';
52
+ import type { getExternalUserData } from '../service/external-api';
48
53
 
54
+ /** Define the types registered within the container */
49
55
  export type ControllerContainerTypes = {
50
56
  adminService: AdminService;
51
57
  adminController: AdminController;
52
58
  apiKey: string;
53
- getExternalData: Curried1<typeof getExternalData>;
59
+ getExternalUserData: Curried1<typeof getExternalUserData>;
54
60
  };
55
61
 
56
62
  ```
@@ -65,17 +71,18 @@ import { containerRegisterFunctionResolver, IContainer, register } from '@rocket
65
71
 
66
72
  import { AdminController } from '../controller/admin';
67
73
  import { AdminService } from '../service/admin';
68
- import { getExternalData } from '../service/external-api';
74
+ import { getExternalUserData } from '../service/external-api';
69
75
  import { ControllerContainerTypes } from './types';
70
76
 
71
77
  export const functionResolver = containerRegisterFunctionResolver<ControllerContainerTypes>();
72
78
 
73
79
  export function makeContainer(): IContainer<ControllerContainerTypes> {
80
+ // Register all the keys of the 'ControllerContainerTypes'
74
81
  return register<ControllerContainerTypes>({
75
82
  adminController: b => b.class(AdminController).construct(['adminService']),
76
83
  adminService: b => b.class(AdminService).construct([]),
77
84
  apiKey: b => b.constant('xyz...'),
78
- getExternalData: b => b.functionResolver(functionResolver.curry1(getExternalData, 'apiKey')),
85
+ getExternalUserData: b => b.functionResolver(functionResolver.curry1(getExternalUserData, 'apiKey')),
79
86
  });
80
87
  }
81
88
 
@@ -90,11 +97,11 @@ export function boot() {
90
97
  // Register the container
91
98
  const container = makeContainer();
92
99
 
93
- // fn has type "(id: number): number" as we curried out the apiKey param
94
- const fn = container.get('getExternalData');
100
+ // getExternalUserData has type "(id: number): IUser" as we curried out the apiKey param
101
+ const getExternalUserData = container.get('getExternalUserData');
95
102
 
96
- // extData is a "number"
97
- const extData = fn(23);
103
+ const userData = getExternalUserData(23);
104
+ return userData;
98
105
  }
99
106
 
100
107
  boot();
@@ -110,22 +117,23 @@ boot();
110
117
  ```TypeScript
111
118
  import { containerFactory, containerRegister, containerRegisterFunctionResolver } from '@rocketmakers/ioc';
112
119
 
120
+ // Application Types
113
121
  import { AdminController } from '../controller/admin';
114
122
  import { AdminService } from '../service/admin';
115
- import { getExternalData } from '../service/external-api';
123
+ import { getExternalUserData } from '../service/external-api';
116
124
  import { ControllerContainerTypes } from './types';
117
125
 
126
+ // Create legacy helper functions
118
127
  export const register = containerRegister<ControllerContainerTypes>();
119
128
  export const functionResolver = containerRegisterFunctionResolver<ControllerContainerTypes>();
120
129
  export const container = containerFactory<ControllerContainerTypes>();
121
130
 
122
131
  export function registerIoC(): void {
132
+ // Register all the keys of the 'ControllerContainerTypes'
123
133
  register.class('adminService', AdminService).construct([]).inSingletonScope();
124
134
  register.class('adminController', AdminController).construct(['adminService']).inSingletonScope();
125
-
126
135
  register.constant('apiKey', 'xyz...');
127
-
128
- register.function('getExternalData', functionResolver.curry1(getExternalData, 'apiKey'));
136
+ register.function('getExternalUserData', functionResolver.curry1(getExternalUserData, 'apiKey'));
129
137
  }
130
138
 
131
139
  ```
@@ -139,11 +147,11 @@ export function boot() {
139
147
  // Register the container
140
148
  registerIoC();
141
149
 
142
- // fn has type "(id: number): number" as we curried out the apiKey param
143
- const fn = container.get('getExternalData');
150
+ // getExternalUserData has type "(id: number): IUser" as we curried out the apiKey param
151
+ const getExternalUserData = container.get('getExternalUserData');
144
152
 
145
- // extData is a "number"
146
- const extData = fn(23);
153
+ const userData = getExternalUserData(23);
154
+ return userData;
147
155
  }
148
156
 
149
157
  boot();
@@ -1,83 +1,143 @@
1
+ /** Returns a mapped type that removes the first element from the type array */
1
2
  export declare type Tail1<T extends any[]> = ((...t: T) => any) extends (_1: any, ...tail: infer TTail) => any ? TTail : [
2
3
  ];
4
+ /** Returns a mapped type that removes the first 2 elements from the type array */
3
5
  export declare type Tail2<T extends any[]> = ((...t: T) => any) extends (_1: any, _2: any, ...tail: infer TTail) => any ? TTail : [
4
6
  ];
7
+ /** Returns a mapped type that removes the first 3 elements from the type array */
5
8
  export declare type Tail3<T extends any[]> = ((...t: T) => any) extends (_1: any, _2: any, _3: any, ...tail: infer TTail) => any ? TTail : [
6
9
  ];
10
+ /** Returns a mapped type that removes the first 4 elements from the type array */
7
11
  export declare type Tail4<T extends any[]> = ((...t: T) => any) extends (_1: any, _2: any, _3: any, _4: any, ...tail: infer TTail) => any ? TTail : [
8
12
  ];
13
+ /** Returns a mapped type that removes the first 5 elements from the type array */
9
14
  export declare type Tail5<T extends any[]> = ((...t: T) => any) extends (_1: any, _2: any, _3: any, _4: any, _5: any, ...tail: infer TTail) => any ? TTail : [
10
15
  ];
16
+ /** Returns a mapped type that removes the first 6 elements from the type array */
11
17
  export declare type Tail6<T extends any[]> = ((...t: T) => any) extends (_1: any, _2: any, _3: any, _4: any, _5: any, _6: any, ...tail: infer TTail) => any ? TTail : [
12
18
  ];
19
+ /** Returns a mapped type that removes the first 7 elements from the type array */
13
20
  export declare type Tail7<T extends any[]> = ((...t: T) => any) extends (_1: any, _2: any, _3: any, _4: any, _5: any, _6: any, _7: any, ...tail: infer TTail) => any ? TTail : [
14
21
  ];
22
+ /** Returns a mapped type that removes the first 8 elements from the type array */
15
23
  export declare type Tail8<T extends any[]> = ((...t: T) => any) extends (_1: any, _2: any, _3: any, _4: any, _5: any, _6: any, _7: any, _8: any, ...tail: infer TTail) => any ? TTail : [
16
24
  ];
25
+ /** Returns a mapped type that removes the first 9 elements from the type array */
17
26
  export declare type Tail9<T extends any[]> = ((...t: T) => any) extends (_1: any, _2: any, _3: any, _4: any, _5: any, _6: any, _7: any, _8: any, _9: any, ...tail: infer TTail) => any ? TTail : [
18
27
  ];
28
+ /** Returns a mapped type that removes the first 10 elements from the type array */
19
29
  export declare type Tail10<T extends any[]> = ((...t: T) => any) extends (_1: any, _2: any, _3: any, _4: any, _5: any, _6: any, _7: any, _8: any, _9: any, _10: any, ...tail: infer TTail) => any ? TTail : [
20
30
  ];
31
+ /** Returns a mapped type that removes the first 11 elements from the type array */
21
32
  export declare type Tail11<T extends any[]> = ((...t: T) => any) extends (_1: any, _2: any, _3: any, _4: any, _5: any, _6: any, _7: any, _8: any, _9: any, _10: any, _11: any, ...tail: infer TTail) => any ? TTail : [
22
33
  ];
34
+ /** Returns a mapped type that removes the first 12 elements from the type array */
23
35
  export declare type Tail12<T extends any[]> = ((...t: T) => any) extends (_1: any, _2: any, _3: any, _4: any, _5: any, _6: any, _7: any, _8: any, _9: any, _10: any, _11: any, _12: any, ...tail: infer TTail) => any ? TTail : [
24
36
  ];
37
+ /** Returns a mapped type that removes the first 13 elements from the type array */
25
38
  export declare type Tail13<T extends any[]> = ((...t: T) => any) extends (_1: any, _2: any, _3: any, _4: any, _5: any, _6: any, _7: any, _8: any, _9: any, _10: any, _11: any, _12: any, _13: any, ...tail: infer TTail) => any ? TTail : [
26
39
  ];
40
+ /** Returns a mapped type that removes the first 14 elements from the type array */
27
41
  export declare type Tail14<T extends any[]> = ((...t: T) => any) extends (_1: any, _2: any, _3: any, _4: any, _5: any, _6: any, _7: any, _8: any, _9: any, _10: any, _11: any, _12: any, _13: any, _14: any, ...tail: infer TTail) => any ? TTail : [
28
42
  ];
43
+ /** Returns a mapped type that removes the first 15 elements from the type array */
29
44
  export declare type Tail15<T extends any[]> = ((...t: T) => any) extends (_1: any, _2: any, _3: any, _4: any, _5: any, _6: any, _7: any, _8: any, _9: any, _10: any, _11: any, _12: any, _13: any, _14: any, _15: any, ...tail: infer TTail) => any ? TTail : [
30
45
  ];
46
+ /** Returns a mapped type that removes the first 16 elements from the type array */
31
47
  export declare type Tail16<T extends any[]> = ((...t: T) => any) extends (_1: any, _2: any, _3: any, _4: any, _5: any, _6: any, _7: any, _8: any, _9: any, _10: any, _11: any, _12: any, _13: any, _14: any, _15: any, _16: any, ...tail: infer TTail) => any ? TTail : [
32
48
  ];
49
+ /** Returns a mapped type that removes the first 17 elements from the type array */
33
50
  export declare type Tail17<T extends any[]> = ((...t: T) => any) extends (_1: any, _2: any, _3: any, _4: any, _5: any, _6: any, _7: any, _8: any, _9: any, _10: any, _11: any, _12: any, _13: any, _14: any, _15: any, _16: any, _17: any, ...tail: infer TTail) => any ? TTail : [
34
51
  ];
52
+ /** Returns a mapped type that removes the first 18 elements from the type array */
35
53
  export declare type Tail18<T extends any[]> = ((...t: T) => any) extends (_1: any, _2: any, _3: any, _4: any, _5: any, _6: any, _7: any, _8: any, _9: any, _10: any, _11: any, _12: any, _13: any, _14: any, _15: any, _16: any, _17: any, _18: any, ...tail: infer TTail) => any ? TTail : [
36
54
  ];
55
+ /** Returns a mapped type that removes the first 19 elements from the type array */
37
56
  export declare type Tail19<T extends any[]> = ((...t: T) => any) extends (_1: any, _2: any, _3: any, _4: any, _5: any, _6: any, _7: any, _8: any, _9: any, _10: any, _11: any, _12: any, _13: any, _14: any, _15: any, _16: any, _17: any, _18: any, _19: any, ...tail: infer TTail) => any ? TTail : [
38
57
  ];
58
+ /** Returns a mapped type that removes the first 20 elements from the type array */
39
59
  export declare type Tail20<T extends any[]> = ((...t: T) => any) extends (_1: any, _2: any, _3: any, _4: any, _5: any, _6: any, _7: any, _8: any, _9: any, _10: any, _11: any, _12: any, _13: any, _14: any, _15: any, _16: any, _17: any, _18: any, _19: any, _20: any, ...tail: infer TTail) => any ? TTail : [
40
60
  ];
61
+ /** Returns a mapped type of the function that removes the first parameter from the method */
41
62
  export declare type Curried1<T extends (...args: any[]) => any> = (...tail: Tail1<Parameters<T>>) => ReturnType<T>;
63
+ /** Returns a mapped type of the function that removes the first 2 parameters from the method */
42
64
  export declare type Curried2<T extends (...args: any[]) => any> = (...tail: Tail2<Parameters<T>>) => ReturnType<T>;
65
+ /** Returns a mapped type of the function that removes the first 3 parameters from the method */
43
66
  export declare type Curried3<T extends (...args: any[]) => any> = (...tail: Tail3<Parameters<T>>) => ReturnType<T>;
67
+ /** Returns a mapped type of the function that removes the first 4 parameters from the method */
44
68
  export declare type Curried4<T extends (...args: any[]) => any> = (...tail: Tail4<Parameters<T>>) => ReturnType<T>;
69
+ /** Returns a mapped type of the function that removes the first 5 parameters from the method */
45
70
  export declare type Curried5<T extends (...args: any[]) => any> = (...tail: Tail5<Parameters<T>>) => ReturnType<T>;
71
+ /** Returns a mapped type of the function that removes the first 6 parameters from the method */
46
72
  export declare type Curried6<T extends (...args: any[]) => any> = (...tail: Tail6<Parameters<T>>) => ReturnType<T>;
73
+ /** Returns a mapped type of the function that removes the first 7 parameters from the method */
47
74
  export declare type Curried7<T extends (...args: any[]) => any> = (...tail: Tail7<Parameters<T>>) => ReturnType<T>;
75
+ /** Returns a mapped type of the function that removes the first 8 parameters from the method */
48
76
  export declare type Curried8<T extends (...args: any[]) => any> = (...tail: Tail8<Parameters<T>>) => ReturnType<T>;
77
+ /** Returns a mapped type of the function that removes the first 9 parameters from the method */
49
78
  export declare type Curried9<T extends (...args: any[]) => any> = (...tail: Tail9<Parameters<T>>) => ReturnType<T>;
79
+ /** Returns a mapped type of the function that removes the first 10 parameters from the method */
50
80
  export declare type Curried10<T extends (...args: any[]) => any> = (...tail: Tail10<Parameters<T>>) => ReturnType<T>;
81
+ /** Returns a mapped type of the function that removes the first 11 parameters from the method */
51
82
  export declare type Curried11<T extends (...args: any[]) => any> = (...tail: Tail11<Parameters<T>>) => ReturnType<T>;
83
+ /** Returns a mapped type of the function that removes the first 12 parameters from the method */
52
84
  export declare type Curried12<T extends (...args: any[]) => any> = (...tail: Tail12<Parameters<T>>) => ReturnType<T>;
85
+ /** Returns a mapped type of the function that removes the first 13 parameters from the method */
53
86
  export declare type Curried13<T extends (...args: any[]) => any> = (...tail: Tail13<Parameters<T>>) => ReturnType<T>;
87
+ /** Returns a mapped type of the function that removes the first 14 parameters from the method */
54
88
  export declare type Curried14<T extends (...args: any[]) => any> = (...tail: Tail14<Parameters<T>>) => ReturnType<T>;
89
+ /** Returns a mapped type of the function that removes the first 15 parameters from the method */
55
90
  export declare type Curried15<T extends (...args: any[]) => any> = (...tail: Tail15<Parameters<T>>) => ReturnType<T>;
91
+ /** Returns a mapped type of the function that removes the first 16 parameters from the method */
56
92
  export declare type Curried16<T extends (...args: any[]) => any> = (...tail: Tail16<Parameters<T>>) => ReturnType<T>;
93
+ /** Returns a mapped type of the function that removes the first 17 parameters from the method */
57
94
  export declare type Curried17<T extends (...args: any[]) => any> = (...tail: Tail17<Parameters<T>>) => ReturnType<T>;
95
+ /** Returns a mapped type of the function that removes the first 18 parameters from the method */
58
96
  export declare type Curried18<T extends (...args: any[]) => any> = (...tail: Tail18<Parameters<T>>) => ReturnType<T>;
97
+ /** Returns a mapped type of the function that removes the first 19 parameters from the method */
59
98
  export declare type Curried19<T extends (...args: any[]) => any> = (...tail: Tail19<Parameters<T>>) => ReturnType<T>;
99
+ /** Returns a mapped type of the function that removes the first 20 parameters from the method */
60
100
  export declare type Curried20<T extends (...args: any[]) => any> = (...tail: Tail20<Parameters<T>>) => ReturnType<T>;
101
+ /** Returns the type in position 1 of the type array */
61
102
  export declare type Param1<T extends any[]> = T extends [
62
103
  any,
63
104
  ...any[]
64
105
  ] ? T[0] : never;
106
+ /** Returns the type in position 2 of the type array */
65
107
  export declare type Param2<T extends any[]> = Param1<Tail1<T>>;
108
+ /** Returns the type in position 3 of the type array */
66
109
  export declare type Param3<T extends any[]> = Param1<Tail2<T>>;
110
+ /** Returns the type in position 4 of the type array */
67
111
  export declare type Param4<T extends any[]> = Param1<Tail3<T>>;
112
+ /** Returns the type in position 5 of the type array */
68
113
  export declare type Param5<T extends any[]> = Param1<Tail4<T>>;
114
+ /** Returns the type in position 6 of the type array */
69
115
  export declare type Param6<T extends any[]> = Param1<Tail5<T>>;
116
+ /** Returns the type in position 7 of the type array */
70
117
  export declare type Param7<T extends any[]> = Param1<Tail6<T>>;
118
+ /** Returns the type in position 8 of the type array */
71
119
  export declare type Param8<T extends any[]> = Param1<Tail7<T>>;
120
+ /** Returns the type in position 9 of the type array */
72
121
  export declare type Param9<T extends any[]> = Param1<Tail8<T>>;
122
+ /** Returns the type in position 10 of the type array */
73
123
  export declare type Param10<T extends any[]> = Param1<Tail9<T>>;
124
+ /** Returns the type in position 11 of the type array */
74
125
  export declare type Param11<T extends any[]> = Param1<Tail10<T>>;
126
+ /** Returns the type in position 12 of the type array */
75
127
  export declare type Param12<T extends any[]> = Param1<Tail11<T>>;
128
+ /** Returns the type in position 13 of the type array */
76
129
  export declare type Param13<T extends any[]> = Param1<Tail12<T>>;
130
+ /** Returns the type in position 14 of the type array */
77
131
  export declare type Param14<T extends any[]> = Param1<Tail13<T>>;
132
+ /** Returns the type in position 15 of the type array */
78
133
  export declare type Param15<T extends any[]> = Param1<Tail14<T>>;
134
+ /** Returns the type in position 16 of the type array */
79
135
  export declare type Param16<T extends any[]> = Param1<Tail15<T>>;
136
+ /** Returns the type in position 17 of the type array */
80
137
  export declare type Param17<T extends any[]> = Param1<Tail16<T>>;
138
+ /** Returns the type in position 18 of the type array */
81
139
  export declare type Param18<T extends any[]> = Param1<Tail17<T>>;
140
+ /** Returns the type in position 19 of the type array */
82
141
  export declare type Param19<T extends any[]> = Param1<Tail18<T>>;
142
+ /** Returns the type in position 20 of the type array */
83
143
  export declare type Param20<T extends any[]> = Param1<Tail19<T>>;
package/lib/error.d.ts ADDED
@@ -0,0 +1,4 @@
1
+ export declare class IocDuplicateKeyError extends Error {
2
+ duplicateKeys: string[];
3
+ constructor(duplicateKeys: string[]);
4
+ }
package/lib/error.js ADDED
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.IocDuplicateKeyError = void 0;
4
+ var tslib_1 = require("tslib");
5
+ var IocDuplicateKeyError = /** @class */ (function (_super) {
6
+ tslib_1.__extends(IocDuplicateKeyError, _super);
7
+ function IocDuplicateKeyError(duplicateKeys) {
8
+ var _newTarget = this.constructor;
9
+ var _this = _super.call(this) || this;
10
+ _this.duplicateKeys = duplicateKeys;
11
+ Object.setPrototypeOf(_this, _newTarget.prototype);
12
+ _this.message = "Duplicate keys found\n".concat(duplicateKeys.join("\n"));
13
+ if (Error.captureStackTrace !== undefined) {
14
+ Error.captureStackTrace(_this, _this.constructor);
15
+ }
16
+ return _this;
17
+ }
18
+ return IocDuplicateKeyError;
19
+ }(Error));
20
+ exports.IocDuplicateKeyError = IocDuplicateKeyError;
package/lib/index.d.ts CHANGED
@@ -1,17 +1,11 @@
1
1
  import 'reflect-metadata';
2
2
  import { interfaces } from 'inversify';
3
+ import { IContainerRegistrationHelper, MapTuple, NewableOf } from './modules';
3
4
  import { IFunctionResolver, PropsOfType, StringKeyof } from './tail.generated';
4
5
  export * from './curry.generated';
5
6
  export declare type BindingInWhenOnSyntax<T> = interfaces.BindingInWhenOnSyntax<T>;
6
7
  export declare const internalContainer: import("inversify/dts/container/container").Container;
7
- declare type PropsNotOfType<T, X> = {
8
- [P in StringKeyof<T>]: T[P] extends X ? never : P;
9
- }[StringKeyof<T>];
10
- declare type MapTuple<F extends any[], TK> = {
11
- [K in keyof F]: F[K] extends F[number] ? PropsOfType<TK, F[K]> : never;
12
- };
13
- declare type Newable = new (...args: any) => any;
14
- declare type NewableOf<T> = new (...args: any) => T;
8
+ /** Use this helper function to provide container curry functions */
15
9
  export declare function containerRegisterFunctionResolver<T>(): {
16
10
  curry1<TFn extends (...args: any[]) => any, K1 extends PropsOfType<T, import("./curry.generated").Param1<Parameters<TFn>>>>(fn: TFn, key1: K1): IFunctionResolver<import("./curry.generated").Curried1<TFn>>;
17
11
  curry2<TFn_1 extends (...args: any[]) => any, K1_1 extends PropsOfType<T, import("./curry.generated").Param1<Parameters<TFn_1>>>, K2 extends PropsOfType<T, import("./curry.generated").Param1<import("./curry.generated").Tail1<Parameters<TFn_1>>>>>(fn: TFn_1, key1: K1_1, key2: K2): IFunctionResolver<import("./curry.generated").Curried2<TFn_1>>;
@@ -38,38 +32,53 @@ export declare const reflectMetadataKeys: {
38
32
  injectable: string;
39
33
  injected: string;
40
34
  };
35
+ /** Test if the class was made Injectable */
41
36
  export declare function wasMadeInjectable(classType: any): boolean;
37
+ /** Mark the class as Injectable */
42
38
  export declare function makeInjectable(classType: any): void;
39
+ /** Test if the class parameter was made as Injected */
40
+ export declare function wasParamMadeInjected(classType: any, index: number): any;
41
+ /** Mark the class parameter as Injected */
42
+ export declare function makeParamInjected(classType: any, index: number, serviceIdentifier: string): void;
43
+ /** @deprecated Renamed to makeParamInjected */
43
44
  export declare function makeInjected(classType: any, index: number, serviceIdentifier: string): void;
45
+ /** Mark the class parameter as Unmanaged */
46
+ export declare function makeParamUnmanaged(classType: any, parameterIndex: number): void;
47
+ /** @deprecated Renamed to makeParamUnmanaged */
44
48
  export declare function makeUnmanaged(classType: any, parameterIndex: number): void;
45
- export declare function registerClass<T extends Newable>(key: string, classType: T, ctorParams: string[]): BindingInWhenOnSyntax<InstanceType<T>>;
46
49
  declare class Binder<T, TItem, TDep> {
47
50
  private key;
48
51
  constructor(key: string);
52
+ /** Gets the underlying container binding to the specified key */
49
53
  get binding(): interfaces.BindingToSyntax<TItem>;
54
+ /** Register a function */
50
55
  function(item: TItem): interfaces.BindingWhenOnSyntax<TItem>;
56
+ /** Register a function resolver */
51
57
  functionResolver(item: IFunctionResolver<TItem>): interfaces.BindingWhenOnSyntax<TItem>;
58
+ /** Register a constant */
52
59
  constant(item: TItem): interfaces.BindingWhenOnSyntax<TItem>;
60
+ /** Register a class */
53
61
  class<C extends NewableOf<TItem>>(cls: C): {
54
62
  construct(keys: MapTuple<ConstructorParameters<C>, T & TDep>): BindingInWhenOnSyntax<InstanceType<C>>;
55
63
  };
56
64
  }
57
- export interface IContainerRegistrationHelper<T> {
58
- function<KFunc extends PropsOfType<T, Function>>(key: KFunc, item: T[KFunc] | IFunctionResolver<T[KFunc]>): void;
59
- constant<KConst extends PropsNotOfType<T, Function>>(key: KConst, item: T[KConst]): void;
60
- class<KClass extends StringKeyof<T>, C extends NewableOf<T[KClass]>>(key: KClass, cls: C): {
61
- construct<TK = T>(keys: MapTuple<ConstructorParameters<C>, TK>): BindingInWhenOnSyntax<InstanceType<C>>;
62
- };
63
- }
65
+ /** Legacy: Create the register for a container of type T */
64
66
  export declare function containerRegister<T>(): IContainerRegistrationHelper<T>;
65
67
  export declare type ContainerRegistrant<T, TItem, TDep> = (item: Binder<T, TItem, TDep>) => interfaces.BindingOnSyntax<TItem>;
66
68
  export declare type ContainerRegister<T, TDep> = {
67
69
  [P in keyof T]-?: ContainerRegistrant<T, T[P], TDep>;
68
70
  };
71
+ /** The definition of an IoC Container */
69
72
  export interface IContainer<T> {
73
+ /** The keys */
70
74
  readonly keys: string[];
75
+ /** Resolve a key from the container */
71
76
  get<K extends StringKeyof<T>>(key: K): T[K];
72
77
  }
78
+ /** Legacy: Create a container of type T */
73
79
  export declare function containerFactory<T>(): IContainer<T>;
80
+ /** Register the bindings required for your container */
74
81
  export declare function register<T>(cr: ContainerRegister<T, {}>): IContainer<T>;
75
82
  export declare function register<T, TDep>(cr: ContainerRegister<T, TDep>, dependent: IContainer<TDep>): IContainer<T & TDep>;
83
+ /** Safely merge two containers */
84
+ export declare function mergeContainers<T1, T2>(container1: IContainer<T1>, container2: IContainer<T2>): IContainer<T1 & T2>;
package/lib/index.js CHANGED
@@ -1,9 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.register = exports.containerFactory = exports.containerRegister = exports.registerClass = exports.makeUnmanaged = exports.makeInjected = exports.makeInjectable = exports.wasMadeInjectable = exports.reflectMetadataKeys = exports.containerRegisterFunctionResolver = exports.internalContainer = void 0;
3
+ exports.mergeContainers = exports.register = exports.containerFactory = exports.containerRegister = exports.makeUnmanaged = exports.makeParamUnmanaged = exports.makeInjected = exports.makeParamInjected = exports.wasParamMadeInjected = exports.makeInjectable = exports.wasMadeInjectable = exports.reflectMetadataKeys = exports.containerRegisterFunctionResolver = exports.internalContainer = void 0;
4
4
  var tslib_1 = require("tslib");
5
5
  require("reflect-metadata");
6
6
  var inversify_1 = require("inversify");
7
+ var error_1 = require("./error");
7
8
  var global_1 = require("./global");
8
9
  var tail_generated_1 = require("./tail.generated");
9
10
  tslib_1.__exportStar(require("./curry.generated"), exports);
@@ -30,6 +31,7 @@ function curryInner(fn) {
30
31
  },
31
32
  };
32
33
  }
34
+ /** Use this helper function to provide container curry functions */
33
35
  function containerRegisterFunctionResolver() {
34
36
  return (0, tail_generated_1.containerRegisterFunctionResolverInternal)(curryInner);
35
37
  }
@@ -38,10 +40,12 @@ exports.reflectMetadataKeys = {
38
40
  injectable: 'inversify:paramtypes',
39
41
  injected: 'inversify:tagged',
40
42
  };
43
+ /** Test if the class was made Injectable */
41
44
  function wasMadeInjectable(classType) {
42
45
  return Reflect.hasMetadata(exports.reflectMetadataKeys.injectable, classType);
43
46
  }
44
47
  exports.wasMadeInjectable = wasMadeInjectable;
48
+ /** Mark the class as Injectable */
45
49
  function makeInjectable(classType) {
46
50
  if (wasMadeInjectable(classType)) {
47
51
  return;
@@ -49,27 +53,40 @@ function makeInjectable(classType) {
49
53
  (0, inversify_1.decorate)((0, inversify_1.injectable)(), classType);
50
54
  }
51
55
  exports.makeInjectable = makeInjectable;
52
- function wasParamInjected(classType, index) {
56
+ /** Test if the class parameter was made as Injected */
57
+ function wasParamMadeInjected(classType, index) {
53
58
  var data = Reflect.getMetadata(exports.reflectMetadataKeys.injected, classType);
54
59
  return data && !!data[index];
55
60
  }
56
- function makeInjected(classType, index, serviceIdentifier) {
57
- if (wasParamInjected(classType, index)) {
61
+ exports.wasParamMadeInjected = wasParamMadeInjected;
62
+ /** Mark the class parameter as Injected */
63
+ function makeParamInjected(classType, index, serviceIdentifier) {
64
+ if (wasParamMadeInjected(classType, index)) {
58
65
  return;
59
66
  }
60
67
  (0, inversify_1.decorate)((0, inversify_1.inject)(serviceIdentifier), classType, index);
61
68
  }
69
+ exports.makeParamInjected = makeParamInjected;
70
+ /** @deprecated Renamed to makeParamInjected */
71
+ function makeInjected(classType, index, serviceIdentifier) {
72
+ return makeParamInjected(classType, index, serviceIdentifier);
73
+ }
62
74
  exports.makeInjected = makeInjected;
63
- function makeUnmanaged(classType, parameterIndex) {
75
+ /** Mark the class parameter as Unmanaged */
76
+ function makeParamUnmanaged(classType, parameterIndex) {
64
77
  (0, inversify_1.decorate)((0, inversify_1.unmanaged)(), classType, parameterIndex);
65
78
  }
79
+ exports.makeParamUnmanaged = makeParamUnmanaged;
80
+ /** @deprecated Renamed to makeParamUnmanaged */
81
+ function makeUnmanaged(classType, parameterIndex) {
82
+ makeParamUnmanaged(classType, parameterIndex);
83
+ }
66
84
  exports.makeUnmanaged = makeUnmanaged;
67
85
  function registerClass(key, classType, ctorParams) {
68
86
  makeInjectable(classType);
69
- ctorParams.forEach(function (c, i) { return makeInjected(classType, i, c); });
87
+ ctorParams.forEach(function (c, i) { return makeParamInjected(classType, i, c); });
70
88
  return exports.internalContainer.bind(key).to(classType);
71
89
  }
72
- exports.registerClass = registerClass;
73
90
  function isFunctionResolver(item) {
74
91
  var resolved = item === null || item === void 0 ? void 0 : item.resolved;
75
92
  return resolved && typeof resolved === 'function';
@@ -79,21 +96,26 @@ var Binder = /** @class */ (function () {
79
96
  this.key = key;
80
97
  }
81
98
  Object.defineProperty(Binder.prototype, "binding", {
99
+ /** Gets the underlying container binding to the specified key */
82
100
  get: function () {
83
101
  return exports.internalContainer.bind(this.key);
84
102
  },
85
103
  enumerable: false,
86
104
  configurable: true
87
105
  });
106
+ /** Register a function */
88
107
  Binder.prototype.function = function (item) {
89
108
  return this.binding.toFunction(item);
90
109
  };
110
+ /** Register a function resolver */
91
111
  Binder.prototype.functionResolver = function (item) {
92
112
  return this.binding.toFactory(function () { return item.resolved(); });
93
113
  };
114
+ /** Register a constant */
94
115
  Binder.prototype.constant = function (item) {
95
116
  return this.binding.toConstantValue(item);
96
117
  };
118
+ /** Register a class */
97
119
  Binder.prototype.class = function (cls) {
98
120
  var k = this.key;
99
121
  return {
@@ -104,8 +126,10 @@ var Binder = /** @class */ (function () {
104
126
  };
105
127
  return Binder;
106
128
  }());
129
+ /** Legacy: Create the register for a container of type T */
107
130
  function containerRegister() {
108
131
  return {
132
+ /** Register a function/function resolver */
109
133
  function: function (key, item) {
110
134
  var b = new Binder(key);
111
135
  if (isFunctionResolver(item)) {
@@ -113,10 +137,12 @@ function containerRegister() {
113
137
  }
114
138
  return b.function(item);
115
139
  },
140
+ /** Register a constant */
116
141
  constant: function (key, item) {
117
142
  var b = new Binder(key);
118
143
  return b.constant(item);
119
144
  },
145
+ /** Register a class */
120
146
  class: function (key, cls) {
121
147
  var b = new Binder(key);
122
148
  var dd = b.class(cls);
@@ -133,24 +159,31 @@ function createContainerOf(keys) {
133
159
  },
134
160
  };
135
161
  }
162
+ /** Legacy: Create a container of type T */
136
163
  function containerFactory() {
137
164
  return createContainerOf([]);
138
165
  }
139
166
  exports.containerFactory = containerFactory;
167
+ function getCombinedKeys(keys, dependent) {
168
+ var duplicates = keys.filter(function (k) { return dependent.indexOf(k) > -1; });
169
+ if (duplicates.length) {
170
+ throw new error_1.IocDuplicateKeyError(duplicates);
171
+ }
172
+ return tslib_1.__spreadArray(tslib_1.__spreadArray([], dependent, true), keys, true);
173
+ }
140
174
  function register(cr, dependent) {
141
175
  var keys = Object.keys(cr);
142
- var extraKeys = [];
143
- if (dependent) {
144
- extraKeys = dependent.keys;
145
- var duplicates = keys.filter(function (k) { return dependent.keys.indexOf(k) > -1; });
146
- if (duplicates.length) {
147
- console.log('We have duplicate keys', duplicates);
148
- }
149
- }
176
+ var combinedKeys = dependent ? getCombinedKeys(keys, dependent.keys) : keys;
150
177
  keys.forEach(function (k) {
151
178
  var binder = new Binder(k);
152
179
  cr[k](binder);
153
180
  });
154
- return createContainerOf(tslib_1.__spreadArray(tslib_1.__spreadArray([], keys, true), extraKeys, true));
181
+ return createContainerOf(combinedKeys);
155
182
  }
156
183
  exports.register = register;
184
+ /** Safely merge two containers */
185
+ function mergeContainers(container1, container2) {
186
+ var combinedKeys = getCombinedKeys(container1.keys, container2.keys);
187
+ return createContainerOf(combinedKeys);
188
+ }
189
+ exports.mergeContainers = mergeContainers;
@@ -0,0 +1,16 @@
1
+ import { interfaces } from 'inversify';
2
+ import { IFunctionResolver, PropsOfType, StringKeyof } from './tail.generated';
3
+ export declare type PropsNotOfType<T, X> = {
4
+ [P in StringKeyof<T>]: T[P] extends X ? never : P;
5
+ }[StringKeyof<T>];
6
+ export declare type MapTuple<F extends any[], TK> = {
7
+ [K in keyof F]: F[K] extends F[number] ? PropsOfType<TK, F[K]> : never;
8
+ };
9
+ export declare type NewableOf<T> = new (...args: any) => T;
10
+ export interface IContainerRegistrationHelper<T> {
11
+ function<KFunc extends PropsOfType<T, Function>>(key: KFunc, item: T[KFunc] | IFunctionResolver<T[KFunc]>): void;
12
+ constant<KConst extends PropsNotOfType<T, Function>>(key: KConst, item: T[KConst]): void;
13
+ class<KClass extends StringKeyof<T>, C extends NewableOf<T[KClass]>>(key: KClass, cls: C): {
14
+ construct<TK = T>(keys: MapTuple<ConstructorParameters<C>, TK>): interfaces.BindingInWhenOnSyntax<InstanceType<C>>;
15
+ };
16
+ }
package/lib/modules.js ADDED
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -7,24 +7,44 @@ export declare type PropsOfType<T, X> = {
7
7
  [P in StringKeyof<T>]: T[P] extends X ? P : never;
8
8
  }[StringKeyof<T>];
9
9
  export declare function containerRegisterFunctionResolverInternal<T>(curryInner: <TFn extends (...args: any[]) => any>(fn: TFn, ...keys: PropertyKey[]) => IFunctionResolver<any>): {
10
+ /** Curry out the first parameter from the method */
10
11
  curry1<TFn extends (...args: any[]) => any, K1 extends PropsOfType<T, Param1<Parameters<TFn>>>>(fn: TFn, key1: K1): IFunctionResolver<Curried1<TFn>>;
12
+ /** Curry out the first 2 parameters from the method */
11
13
  curry2<TFn_1 extends (...args: any[]) => any, K1_1 extends PropsOfType<T, Param1<Parameters<TFn_1>>>, K2 extends PropsOfType<T, Param1<import("./curry.generated").Tail1<Parameters<TFn_1>>>>>(fn: TFn_1, key1: K1_1, key2: K2): IFunctionResolver<Curried2<TFn_1>>;
14
+ /** Curry out the first 3 parameters from the method */
12
15
  curry3<TFn_2 extends (...args: any[]) => any, K1_2 extends PropsOfType<T, Param1<Parameters<TFn_2>>>, K2_1 extends PropsOfType<T, Param1<import("./curry.generated").Tail1<Parameters<TFn_2>>>>, K3 extends PropsOfType<T, Param1<import("./curry.generated").Tail2<Parameters<TFn_2>>>>>(fn: TFn_2, key1: K1_2, key2: K2_1, key3: K3): IFunctionResolver<Curried3<TFn_2>>;
16
+ /** Curry out the first 4 parameters from the method */
13
17
  curry4<TFn_3 extends (...args: any[]) => any, K1_3 extends PropsOfType<T, Param1<Parameters<TFn_3>>>, K2_2 extends PropsOfType<T, Param1<import("./curry.generated").Tail1<Parameters<TFn_3>>>>, K3_1 extends PropsOfType<T, Param1<import("./curry.generated").Tail2<Parameters<TFn_3>>>>, K4 extends PropsOfType<T, Param1<import("./curry.generated").Tail3<Parameters<TFn_3>>>>>(fn: TFn_3, key1: K1_3, key2: K2_2, key3: K3_1, key4: K4): IFunctionResolver<Curried4<TFn_3>>;
18
+ /** Curry out the first 5 parameters from the method */
14
19
  curry5<TFn_4 extends (...args: any[]) => any, K1_4 extends PropsOfType<T, Param1<Parameters<TFn_4>>>, K2_3 extends PropsOfType<T, Param1<import("./curry.generated").Tail1<Parameters<TFn_4>>>>, K3_2 extends PropsOfType<T, Param1<import("./curry.generated").Tail2<Parameters<TFn_4>>>>, K4_1 extends PropsOfType<T, Param1<import("./curry.generated").Tail3<Parameters<TFn_4>>>>, K5 extends PropsOfType<T, Param1<import("./curry.generated").Tail4<Parameters<TFn_4>>>>>(fn: TFn_4, key1: K1_4, key2: K2_3, key3: K3_2, key4: K4_1, key5: K5): IFunctionResolver<Curried5<TFn_4>>;
20
+ /** Curry out the first 6 parameters from the method */
15
21
  curry6<TFn_5 extends (...args: any[]) => any, K1_5 extends PropsOfType<T, Param1<Parameters<TFn_5>>>, K2_4 extends PropsOfType<T, Param1<import("./curry.generated").Tail1<Parameters<TFn_5>>>>, K3_3 extends PropsOfType<T, Param1<import("./curry.generated").Tail2<Parameters<TFn_5>>>>, K4_2 extends PropsOfType<T, Param1<import("./curry.generated").Tail3<Parameters<TFn_5>>>>, K5_1 extends PropsOfType<T, Param1<import("./curry.generated").Tail4<Parameters<TFn_5>>>>, K6 extends PropsOfType<T, Param1<import("./curry.generated").Tail5<Parameters<TFn_5>>>>>(fn: TFn_5, key1: K1_5, key2: K2_4, key3: K3_3, key4: K4_2, key5: K5_1, key6: K6): IFunctionResolver<Curried6<TFn_5>>;
22
+ /** Curry out the first 7 parameters from the method */
16
23
  curry7<TFn_6 extends (...args: any[]) => any, K1_6 extends PropsOfType<T, Param1<Parameters<TFn_6>>>, K2_5 extends PropsOfType<T, Param1<import("./curry.generated").Tail1<Parameters<TFn_6>>>>, K3_4 extends PropsOfType<T, Param1<import("./curry.generated").Tail2<Parameters<TFn_6>>>>, K4_3 extends PropsOfType<T, Param1<import("./curry.generated").Tail3<Parameters<TFn_6>>>>, K5_2 extends PropsOfType<T, Param1<import("./curry.generated").Tail4<Parameters<TFn_6>>>>, K6_1 extends PropsOfType<T, Param1<import("./curry.generated").Tail5<Parameters<TFn_6>>>>, K7 extends PropsOfType<T, Param1<import("./curry.generated").Tail6<Parameters<TFn_6>>>>>(fn: TFn_6, key1: K1_6, key2: K2_5, key3: K3_4, key4: K4_3, key5: K5_2, key6: K6_1, key7: K7): IFunctionResolver<Curried7<TFn_6>>;
24
+ /** Curry out the first 8 parameters from the method */
17
25
  curry8<TFn_7 extends (...args: any[]) => any, K1_7 extends PropsOfType<T, Param1<Parameters<TFn_7>>>, K2_6 extends PropsOfType<T, Param1<import("./curry.generated").Tail1<Parameters<TFn_7>>>>, K3_5 extends PropsOfType<T, Param1<import("./curry.generated").Tail2<Parameters<TFn_7>>>>, K4_4 extends PropsOfType<T, Param1<import("./curry.generated").Tail3<Parameters<TFn_7>>>>, K5_3 extends PropsOfType<T, Param1<import("./curry.generated").Tail4<Parameters<TFn_7>>>>, K6_2 extends PropsOfType<T, Param1<import("./curry.generated").Tail5<Parameters<TFn_7>>>>, K7_1 extends PropsOfType<T, Param1<import("./curry.generated").Tail6<Parameters<TFn_7>>>>, K8 extends PropsOfType<T, Param1<import("./curry.generated").Tail7<Parameters<TFn_7>>>>>(fn: TFn_7, key1: K1_7, key2: K2_6, key3: K3_5, key4: K4_4, key5: K5_3, key6: K6_2, key7: K7_1, key8: K8): IFunctionResolver<Curried8<TFn_7>>;
26
+ /** Curry out the first 9 parameters from the method */
18
27
  curry9<TFn_8 extends (...args: any[]) => any, K1_8 extends PropsOfType<T, Param1<Parameters<TFn_8>>>, K2_7 extends PropsOfType<T, Param1<import("./curry.generated").Tail1<Parameters<TFn_8>>>>, K3_6 extends PropsOfType<T, Param1<import("./curry.generated").Tail2<Parameters<TFn_8>>>>, K4_5 extends PropsOfType<T, Param1<import("./curry.generated").Tail3<Parameters<TFn_8>>>>, K5_4 extends PropsOfType<T, Param1<import("./curry.generated").Tail4<Parameters<TFn_8>>>>, K6_3 extends PropsOfType<T, Param1<import("./curry.generated").Tail5<Parameters<TFn_8>>>>, K7_2 extends PropsOfType<T, Param1<import("./curry.generated").Tail6<Parameters<TFn_8>>>>, K8_1 extends PropsOfType<T, Param1<import("./curry.generated").Tail7<Parameters<TFn_8>>>>, K9 extends PropsOfType<T, Param1<import("./curry.generated").Tail8<Parameters<TFn_8>>>>>(fn: TFn_8, key1: K1_8, key2: K2_7, key3: K3_6, key4: K4_5, key5: K5_4, key6: K6_3, key7: K7_2, key8: K8_1, key9: K9): IFunctionResolver<Curried9<TFn_8>>;
28
+ /** Curry out the first 10 parameters from the method */
19
29
  curry10<TFn_9 extends (...args: any[]) => any, K1_9 extends PropsOfType<T, Param1<Parameters<TFn_9>>>, K2_8 extends PropsOfType<T, Param1<import("./curry.generated").Tail1<Parameters<TFn_9>>>>, K3_7 extends PropsOfType<T, Param1<import("./curry.generated").Tail2<Parameters<TFn_9>>>>, K4_6 extends PropsOfType<T, Param1<import("./curry.generated").Tail3<Parameters<TFn_9>>>>, K5_5 extends PropsOfType<T, Param1<import("./curry.generated").Tail4<Parameters<TFn_9>>>>, K6_4 extends PropsOfType<T, Param1<import("./curry.generated").Tail5<Parameters<TFn_9>>>>, K7_3 extends PropsOfType<T, Param1<import("./curry.generated").Tail6<Parameters<TFn_9>>>>, K8_2 extends PropsOfType<T, Param1<import("./curry.generated").Tail7<Parameters<TFn_9>>>>, K9_1 extends PropsOfType<T, Param1<import("./curry.generated").Tail8<Parameters<TFn_9>>>>, K10 extends PropsOfType<T, Param1<import("./curry.generated").Tail9<Parameters<TFn_9>>>>>(fn: TFn_9, key1: K1_9, key2: K2_8, key3: K3_7, key4: K4_6, key5: K5_5, key6: K6_4, key7: K7_3, key8: K8_2, key9: K9_1, key10: K10): IFunctionResolver<Curried10<TFn_9>>;
30
+ /** Curry out the first 11 parameters from the method */
20
31
  curry11<TFn_10 extends (...args: any[]) => any, K1_10 extends PropsOfType<T, Param1<Parameters<TFn_10>>>, K2_9 extends PropsOfType<T, Param1<import("./curry.generated").Tail1<Parameters<TFn_10>>>>, K3_8 extends PropsOfType<T, Param1<import("./curry.generated").Tail2<Parameters<TFn_10>>>>, K4_7 extends PropsOfType<T, Param1<import("./curry.generated").Tail3<Parameters<TFn_10>>>>, K5_6 extends PropsOfType<T, Param1<import("./curry.generated").Tail4<Parameters<TFn_10>>>>, K6_5 extends PropsOfType<T, Param1<import("./curry.generated").Tail5<Parameters<TFn_10>>>>, K7_4 extends PropsOfType<T, Param1<import("./curry.generated").Tail6<Parameters<TFn_10>>>>, K8_3 extends PropsOfType<T, Param1<import("./curry.generated").Tail7<Parameters<TFn_10>>>>, K9_2 extends PropsOfType<T, Param1<import("./curry.generated").Tail8<Parameters<TFn_10>>>>, K10_1 extends PropsOfType<T, Param1<import("./curry.generated").Tail9<Parameters<TFn_10>>>>, K11 extends PropsOfType<T, Param1<import("./curry.generated").Tail10<Parameters<TFn_10>>>>>(fn: TFn_10, key1: K1_10, key2: K2_9, key3: K3_8, key4: K4_7, key5: K5_6, key6: K6_5, key7: K7_4, key8: K8_3, key9: K9_2, key10: K10_1, key11: K11): IFunctionResolver<Curried11<TFn_10>>;
32
+ /** Curry out the first 12 parameters from the method */
21
33
  curry12<TFn_11 extends (...args: any[]) => any, K1_11 extends PropsOfType<T, Param1<Parameters<TFn_11>>>, K2_10 extends PropsOfType<T, Param1<import("./curry.generated").Tail1<Parameters<TFn_11>>>>, K3_9 extends PropsOfType<T, Param1<import("./curry.generated").Tail2<Parameters<TFn_11>>>>, K4_8 extends PropsOfType<T, Param1<import("./curry.generated").Tail3<Parameters<TFn_11>>>>, K5_7 extends PropsOfType<T, Param1<import("./curry.generated").Tail4<Parameters<TFn_11>>>>, K6_6 extends PropsOfType<T, Param1<import("./curry.generated").Tail5<Parameters<TFn_11>>>>, K7_5 extends PropsOfType<T, Param1<import("./curry.generated").Tail6<Parameters<TFn_11>>>>, K8_4 extends PropsOfType<T, Param1<import("./curry.generated").Tail7<Parameters<TFn_11>>>>, K9_3 extends PropsOfType<T, Param1<import("./curry.generated").Tail8<Parameters<TFn_11>>>>, K10_2 extends PropsOfType<T, Param1<import("./curry.generated").Tail9<Parameters<TFn_11>>>>, K11_1 extends PropsOfType<T, Param1<import("./curry.generated").Tail10<Parameters<TFn_11>>>>, K12 extends PropsOfType<T, Param1<import("./curry.generated").Tail11<Parameters<TFn_11>>>>>(fn: TFn_11, key1: K1_11, key2: K2_10, key3: K3_9, key4: K4_8, key5: K5_7, key6: K6_6, key7: K7_5, key8: K8_4, key9: K9_3, key10: K10_2, key11: K11_1, key12: K12): IFunctionResolver<Curried12<TFn_11>>;
34
+ /** Curry out the first 13 parameters from the method */
22
35
  curry13<TFn_12 extends (...args: any[]) => any, K1_12 extends PropsOfType<T, Param1<Parameters<TFn_12>>>, K2_11 extends PropsOfType<T, Param1<import("./curry.generated").Tail1<Parameters<TFn_12>>>>, K3_10 extends PropsOfType<T, Param1<import("./curry.generated").Tail2<Parameters<TFn_12>>>>, K4_9 extends PropsOfType<T, Param1<import("./curry.generated").Tail3<Parameters<TFn_12>>>>, K5_8 extends PropsOfType<T, Param1<import("./curry.generated").Tail4<Parameters<TFn_12>>>>, K6_7 extends PropsOfType<T, Param1<import("./curry.generated").Tail5<Parameters<TFn_12>>>>, K7_6 extends PropsOfType<T, Param1<import("./curry.generated").Tail6<Parameters<TFn_12>>>>, K8_5 extends PropsOfType<T, Param1<import("./curry.generated").Tail7<Parameters<TFn_12>>>>, K9_4 extends PropsOfType<T, Param1<import("./curry.generated").Tail8<Parameters<TFn_12>>>>, K10_3 extends PropsOfType<T, Param1<import("./curry.generated").Tail9<Parameters<TFn_12>>>>, K11_2 extends PropsOfType<T, Param1<import("./curry.generated").Tail10<Parameters<TFn_12>>>>, K12_1 extends PropsOfType<T, Param1<import("./curry.generated").Tail11<Parameters<TFn_12>>>>, K13 extends PropsOfType<T, Param1<import("./curry.generated").Tail12<Parameters<TFn_12>>>>>(fn: TFn_12, key1: K1_12, key2: K2_11, key3: K3_10, key4: K4_9, key5: K5_8, key6: K6_7, key7: K7_6, key8: K8_5, key9: K9_4, key10: K10_3, key11: K11_2, key12: K12_1, key13: K13): IFunctionResolver<Curried13<TFn_12>>;
36
+ /** Curry out the first 14 parameters from the method */
23
37
  curry14<TFn_13 extends (...args: any[]) => any, K1_13 extends PropsOfType<T, Param1<Parameters<TFn_13>>>, K2_12 extends PropsOfType<T, Param1<import("./curry.generated").Tail1<Parameters<TFn_13>>>>, K3_11 extends PropsOfType<T, Param1<import("./curry.generated").Tail2<Parameters<TFn_13>>>>, K4_10 extends PropsOfType<T, Param1<import("./curry.generated").Tail3<Parameters<TFn_13>>>>, K5_9 extends PropsOfType<T, Param1<import("./curry.generated").Tail4<Parameters<TFn_13>>>>, K6_8 extends PropsOfType<T, Param1<import("./curry.generated").Tail5<Parameters<TFn_13>>>>, K7_7 extends PropsOfType<T, Param1<import("./curry.generated").Tail6<Parameters<TFn_13>>>>, K8_6 extends PropsOfType<T, Param1<import("./curry.generated").Tail7<Parameters<TFn_13>>>>, K9_5 extends PropsOfType<T, Param1<import("./curry.generated").Tail8<Parameters<TFn_13>>>>, K10_4 extends PropsOfType<T, Param1<import("./curry.generated").Tail9<Parameters<TFn_13>>>>, K11_3 extends PropsOfType<T, Param1<import("./curry.generated").Tail10<Parameters<TFn_13>>>>, K12_2 extends PropsOfType<T, Param1<import("./curry.generated").Tail11<Parameters<TFn_13>>>>, K13_1 extends PropsOfType<T, Param1<import("./curry.generated").Tail12<Parameters<TFn_13>>>>, K14 extends PropsOfType<T, Param1<import("./curry.generated").Tail13<Parameters<TFn_13>>>>>(fn: TFn_13, key1: K1_13, key2: K2_12, key3: K3_11, key4: K4_10, key5: K5_9, key6: K6_8, key7: K7_7, key8: K8_6, key9: K9_5, key10: K10_4, key11: K11_3, key12: K12_2, key13: K13_1, key14: K14): IFunctionResolver<Curried14<TFn_13>>;
38
+ /** Curry out the first 15 parameters from the method */
24
39
  curry15<TFn_14 extends (...args: any[]) => any, K1_14 extends PropsOfType<T, Param1<Parameters<TFn_14>>>, K2_13 extends PropsOfType<T, Param1<import("./curry.generated").Tail1<Parameters<TFn_14>>>>, K3_12 extends PropsOfType<T, Param1<import("./curry.generated").Tail2<Parameters<TFn_14>>>>, K4_11 extends PropsOfType<T, Param1<import("./curry.generated").Tail3<Parameters<TFn_14>>>>, K5_10 extends PropsOfType<T, Param1<import("./curry.generated").Tail4<Parameters<TFn_14>>>>, K6_9 extends PropsOfType<T, Param1<import("./curry.generated").Tail5<Parameters<TFn_14>>>>, K7_8 extends PropsOfType<T, Param1<import("./curry.generated").Tail6<Parameters<TFn_14>>>>, K8_7 extends PropsOfType<T, Param1<import("./curry.generated").Tail7<Parameters<TFn_14>>>>, K9_6 extends PropsOfType<T, Param1<import("./curry.generated").Tail8<Parameters<TFn_14>>>>, K10_5 extends PropsOfType<T, Param1<import("./curry.generated").Tail9<Parameters<TFn_14>>>>, K11_4 extends PropsOfType<T, Param1<import("./curry.generated").Tail10<Parameters<TFn_14>>>>, K12_3 extends PropsOfType<T, Param1<import("./curry.generated").Tail11<Parameters<TFn_14>>>>, K13_2 extends PropsOfType<T, Param1<import("./curry.generated").Tail12<Parameters<TFn_14>>>>, K14_1 extends PropsOfType<T, Param1<import("./curry.generated").Tail13<Parameters<TFn_14>>>>, K15 extends PropsOfType<T, Param1<import("./curry.generated").Tail14<Parameters<TFn_14>>>>>(fn: TFn_14, key1: K1_14, key2: K2_13, key3: K3_12, key4: K4_11, key5: K5_10, key6: K6_9, key7: K7_8, key8: K8_7, key9: K9_6, key10: K10_5, key11: K11_4, key12: K12_3, key13: K13_2, key14: K14_1, key15: K15): IFunctionResolver<Curried15<TFn_14>>;
40
+ /** Curry out the first 16 parameters from the method */
25
41
  curry16<TFn_15 extends (...args: any[]) => any, K1_15 extends PropsOfType<T, Param1<Parameters<TFn_15>>>, K2_14 extends PropsOfType<T, Param1<import("./curry.generated").Tail1<Parameters<TFn_15>>>>, K3_13 extends PropsOfType<T, Param1<import("./curry.generated").Tail2<Parameters<TFn_15>>>>, K4_12 extends PropsOfType<T, Param1<import("./curry.generated").Tail3<Parameters<TFn_15>>>>, K5_11 extends PropsOfType<T, Param1<import("./curry.generated").Tail4<Parameters<TFn_15>>>>, K6_10 extends PropsOfType<T, Param1<import("./curry.generated").Tail5<Parameters<TFn_15>>>>, K7_9 extends PropsOfType<T, Param1<import("./curry.generated").Tail6<Parameters<TFn_15>>>>, K8_8 extends PropsOfType<T, Param1<import("./curry.generated").Tail7<Parameters<TFn_15>>>>, K9_7 extends PropsOfType<T, Param1<import("./curry.generated").Tail8<Parameters<TFn_15>>>>, K10_6 extends PropsOfType<T, Param1<import("./curry.generated").Tail9<Parameters<TFn_15>>>>, K11_5 extends PropsOfType<T, Param1<import("./curry.generated").Tail10<Parameters<TFn_15>>>>, K12_4 extends PropsOfType<T, Param1<import("./curry.generated").Tail11<Parameters<TFn_15>>>>, K13_3 extends PropsOfType<T, Param1<import("./curry.generated").Tail12<Parameters<TFn_15>>>>, K14_2 extends PropsOfType<T, Param1<import("./curry.generated").Tail13<Parameters<TFn_15>>>>, K15_1 extends PropsOfType<T, Param1<import("./curry.generated").Tail14<Parameters<TFn_15>>>>, K16 extends PropsOfType<T, Param1<import("./curry.generated").Tail15<Parameters<TFn_15>>>>>(fn: TFn_15, key1: K1_15, key2: K2_14, key3: K3_13, key4: K4_12, key5: K5_11, key6: K6_10, key7: K7_9, key8: K8_8, key9: K9_7, key10: K10_6, key11: K11_5, key12: K12_4, key13: K13_3, key14: K14_2, key15: K15_1, key16: K16): IFunctionResolver<Curried16<TFn_15>>;
42
+ /** Curry out the first 17 parameters from the method */
26
43
  curry17<TFn_16 extends (...args: any[]) => any, K1_16 extends PropsOfType<T, Param1<Parameters<TFn_16>>>, K2_15 extends PropsOfType<T, Param1<import("./curry.generated").Tail1<Parameters<TFn_16>>>>, K3_14 extends PropsOfType<T, Param1<import("./curry.generated").Tail2<Parameters<TFn_16>>>>, K4_13 extends PropsOfType<T, Param1<import("./curry.generated").Tail3<Parameters<TFn_16>>>>, K5_12 extends PropsOfType<T, Param1<import("./curry.generated").Tail4<Parameters<TFn_16>>>>, K6_11 extends PropsOfType<T, Param1<import("./curry.generated").Tail5<Parameters<TFn_16>>>>, K7_10 extends PropsOfType<T, Param1<import("./curry.generated").Tail6<Parameters<TFn_16>>>>, K8_9 extends PropsOfType<T, Param1<import("./curry.generated").Tail7<Parameters<TFn_16>>>>, K9_8 extends PropsOfType<T, Param1<import("./curry.generated").Tail8<Parameters<TFn_16>>>>, K10_7 extends PropsOfType<T, Param1<import("./curry.generated").Tail9<Parameters<TFn_16>>>>, K11_6 extends PropsOfType<T, Param1<import("./curry.generated").Tail10<Parameters<TFn_16>>>>, K12_5 extends PropsOfType<T, Param1<import("./curry.generated").Tail11<Parameters<TFn_16>>>>, K13_4 extends PropsOfType<T, Param1<import("./curry.generated").Tail12<Parameters<TFn_16>>>>, K14_3 extends PropsOfType<T, Param1<import("./curry.generated").Tail13<Parameters<TFn_16>>>>, K15_2 extends PropsOfType<T, Param1<import("./curry.generated").Tail14<Parameters<TFn_16>>>>, K16_1 extends PropsOfType<T, Param1<import("./curry.generated").Tail15<Parameters<TFn_16>>>>, K17 extends PropsOfType<T, Param1<import("./curry.generated").Tail16<Parameters<TFn_16>>>>>(fn: TFn_16, key1: K1_16, key2: K2_15, key3: K3_14, key4: K4_13, key5: K5_12, key6: K6_11, key7: K7_10, key8: K8_9, key9: K9_8, key10: K10_7, key11: K11_6, key12: K12_5, key13: K13_4, key14: K14_3, key15: K15_2, key16: K16_1, key17: K17): IFunctionResolver<Curried17<TFn_16>>;
44
+ /** Curry out the first 18 parameters from the method */
27
45
  curry18<TFn_17 extends (...args: any[]) => any, K1_17 extends PropsOfType<T, Param1<Parameters<TFn_17>>>, K2_16 extends PropsOfType<T, Param1<import("./curry.generated").Tail1<Parameters<TFn_17>>>>, K3_15 extends PropsOfType<T, Param1<import("./curry.generated").Tail2<Parameters<TFn_17>>>>, K4_14 extends PropsOfType<T, Param1<import("./curry.generated").Tail3<Parameters<TFn_17>>>>, K5_13 extends PropsOfType<T, Param1<import("./curry.generated").Tail4<Parameters<TFn_17>>>>, K6_12 extends PropsOfType<T, Param1<import("./curry.generated").Tail5<Parameters<TFn_17>>>>, K7_11 extends PropsOfType<T, Param1<import("./curry.generated").Tail6<Parameters<TFn_17>>>>, K8_10 extends PropsOfType<T, Param1<import("./curry.generated").Tail7<Parameters<TFn_17>>>>, K9_9 extends PropsOfType<T, Param1<import("./curry.generated").Tail8<Parameters<TFn_17>>>>, K10_8 extends PropsOfType<T, Param1<import("./curry.generated").Tail9<Parameters<TFn_17>>>>, K11_7 extends PropsOfType<T, Param1<import("./curry.generated").Tail10<Parameters<TFn_17>>>>, K12_6 extends PropsOfType<T, Param1<import("./curry.generated").Tail11<Parameters<TFn_17>>>>, K13_5 extends PropsOfType<T, Param1<import("./curry.generated").Tail12<Parameters<TFn_17>>>>, K14_4 extends PropsOfType<T, Param1<import("./curry.generated").Tail13<Parameters<TFn_17>>>>, K15_3 extends PropsOfType<T, Param1<import("./curry.generated").Tail14<Parameters<TFn_17>>>>, K16_2 extends PropsOfType<T, Param1<import("./curry.generated").Tail15<Parameters<TFn_17>>>>, K17_1 extends PropsOfType<T, Param1<import("./curry.generated").Tail16<Parameters<TFn_17>>>>, K18 extends PropsOfType<T, Param1<import("./curry.generated").Tail17<Parameters<TFn_17>>>>>(fn: TFn_17, key1: K1_17, key2: K2_16, key3: K3_15, key4: K4_14, key5: K5_13, key6: K6_12, key7: K7_11, key8: K8_10, key9: K9_9, key10: K10_8, key11: K11_7, key12: K12_6, key13: K13_5, key14: K14_4, key15: K15_3, key16: K16_2, key17: K17_1, key18: K18): IFunctionResolver<Curried18<TFn_17>>;
46
+ /** Curry out the first 19 parameters from the method */
28
47
  curry19<TFn_18 extends (...args: any[]) => any, K1_18 extends PropsOfType<T, Param1<Parameters<TFn_18>>>, K2_17 extends PropsOfType<T, Param1<import("./curry.generated").Tail1<Parameters<TFn_18>>>>, K3_16 extends PropsOfType<T, Param1<import("./curry.generated").Tail2<Parameters<TFn_18>>>>, K4_15 extends PropsOfType<T, Param1<import("./curry.generated").Tail3<Parameters<TFn_18>>>>, K5_14 extends PropsOfType<T, Param1<import("./curry.generated").Tail4<Parameters<TFn_18>>>>, K6_13 extends PropsOfType<T, Param1<import("./curry.generated").Tail5<Parameters<TFn_18>>>>, K7_12 extends PropsOfType<T, Param1<import("./curry.generated").Tail6<Parameters<TFn_18>>>>, K8_11 extends PropsOfType<T, Param1<import("./curry.generated").Tail7<Parameters<TFn_18>>>>, K9_10 extends PropsOfType<T, Param1<import("./curry.generated").Tail8<Parameters<TFn_18>>>>, K10_9 extends PropsOfType<T, Param1<import("./curry.generated").Tail9<Parameters<TFn_18>>>>, K11_8 extends PropsOfType<T, Param1<import("./curry.generated").Tail10<Parameters<TFn_18>>>>, K12_7 extends PropsOfType<T, Param1<import("./curry.generated").Tail11<Parameters<TFn_18>>>>, K13_6 extends PropsOfType<T, Param1<import("./curry.generated").Tail12<Parameters<TFn_18>>>>, K14_5 extends PropsOfType<T, Param1<import("./curry.generated").Tail13<Parameters<TFn_18>>>>, K15_4 extends PropsOfType<T, Param1<import("./curry.generated").Tail14<Parameters<TFn_18>>>>, K16_3 extends PropsOfType<T, Param1<import("./curry.generated").Tail15<Parameters<TFn_18>>>>, K17_2 extends PropsOfType<T, Param1<import("./curry.generated").Tail16<Parameters<TFn_18>>>>, K18_1 extends PropsOfType<T, Param1<import("./curry.generated").Tail17<Parameters<TFn_18>>>>, K19 extends PropsOfType<T, Param1<import("./curry.generated").Tail18<Parameters<TFn_18>>>>>(fn: TFn_18, key1: K1_18, key2: K2_17, key3: K3_16, key4: K4_15, key5: K5_14, key6: K6_13, key7: K7_12, key8: K8_11, key9: K9_10, key10: K10_9, key11: K11_8, key12: K12_7, key13: K13_6, key14: K14_5, key15: K15_4, key16: K16_3, key17: K17_2, key18: K18_1, key19: K19): IFunctionResolver<Curried19<TFn_18>>;
48
+ /** Curry out the first 20 parameters from the method */
29
49
  curry20<TFn_19 extends (...args: any[]) => any, K1_19 extends PropsOfType<T, Param1<Parameters<TFn_19>>>, K2_18 extends PropsOfType<T, Param1<import("./curry.generated").Tail1<Parameters<TFn_19>>>>, K3_17 extends PropsOfType<T, Param1<import("./curry.generated").Tail2<Parameters<TFn_19>>>>, K4_16 extends PropsOfType<T, Param1<import("./curry.generated").Tail3<Parameters<TFn_19>>>>, K5_15 extends PropsOfType<T, Param1<import("./curry.generated").Tail4<Parameters<TFn_19>>>>, K6_14 extends PropsOfType<T, Param1<import("./curry.generated").Tail5<Parameters<TFn_19>>>>, K7_13 extends PropsOfType<T, Param1<import("./curry.generated").Tail6<Parameters<TFn_19>>>>, K8_12 extends PropsOfType<T, Param1<import("./curry.generated").Tail7<Parameters<TFn_19>>>>, K9_11 extends PropsOfType<T, Param1<import("./curry.generated").Tail8<Parameters<TFn_19>>>>, K10_10 extends PropsOfType<T, Param1<import("./curry.generated").Tail9<Parameters<TFn_19>>>>, K11_9 extends PropsOfType<T, Param1<import("./curry.generated").Tail10<Parameters<TFn_19>>>>, K12_8 extends PropsOfType<T, Param1<import("./curry.generated").Tail11<Parameters<TFn_19>>>>, K13_7 extends PropsOfType<T, Param1<import("./curry.generated").Tail12<Parameters<TFn_19>>>>, K14_6 extends PropsOfType<T, Param1<import("./curry.generated").Tail13<Parameters<TFn_19>>>>, K15_5 extends PropsOfType<T, Param1<import("./curry.generated").Tail14<Parameters<TFn_19>>>>, K16_4 extends PropsOfType<T, Param1<import("./curry.generated").Tail15<Parameters<TFn_19>>>>, K17_3 extends PropsOfType<T, Param1<import("./curry.generated").Tail16<Parameters<TFn_19>>>>, K18_2 extends PropsOfType<T, Param1<import("./curry.generated").Tail17<Parameters<TFn_19>>>>, K19_1 extends PropsOfType<T, Param1<import("./curry.generated").Tail18<Parameters<TFn_19>>>>, K20 extends PropsOfType<T, Param1<import("./curry.generated").Tail19<Parameters<TFn_19>>>>>(fn: TFn_19, key1: K1_19, key2: K2_18, key3: K3_17, key4: K4_16, key5: K5_15, key6: K6_14, key7: K7_13, key8: K8_12, key9: K9_11, key10: K10_10, key11: K11_9, key12: K12_8, key13: K13_7, key14: K14_6, key15: K15_5, key16: K16_4, key17: K17_3, key18: K18_2, key19: K19_1, key20: K20): IFunctionResolver<Curried20<TFn_19>>;
30
50
  };
@@ -3,63 +3,83 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.containerRegisterFunctionResolverInternal = void 0;
4
4
  function containerRegisterFunctionResolverInternal(curryInner) {
5
5
  return {
6
+ /** Curry out the first parameter from the method */
6
7
  curry1: function (fn, key1) {
7
8
  return curryInner(fn, key1);
8
9
  },
10
+ /** Curry out the first 2 parameters from the method */
9
11
  curry2: function (fn, key1, key2) {
10
12
  return curryInner(fn, key1, key2);
11
13
  },
14
+ /** Curry out the first 3 parameters from the method */
12
15
  curry3: function (fn, key1, key2, key3) {
13
16
  return curryInner(fn, key1, key2, key3);
14
17
  },
18
+ /** Curry out the first 4 parameters from the method */
15
19
  curry4: function (fn, key1, key2, key3, key4) {
16
20
  return curryInner(fn, key1, key2, key3, key4);
17
21
  },
22
+ /** Curry out the first 5 parameters from the method */
18
23
  curry5: function (fn, key1, key2, key3, key4, key5) {
19
24
  return curryInner(fn, key1, key2, key3, key4, key5);
20
25
  },
26
+ /** Curry out the first 6 parameters from the method */
21
27
  curry6: function (fn, key1, key2, key3, key4, key5, key6) {
22
28
  return curryInner(fn, key1, key2, key3, key4, key5, key6);
23
29
  },
30
+ /** Curry out the first 7 parameters from the method */
24
31
  curry7: function (fn, key1, key2, key3, key4, key5, key6, key7) {
25
32
  return curryInner(fn, key1, key2, key3, key4, key5, key6, key7);
26
33
  },
34
+ /** Curry out the first 8 parameters from the method */
27
35
  curry8: function (fn, key1, key2, key3, key4, key5, key6, key7, key8) {
28
36
  return curryInner(fn, key1, key2, key3, key4, key5, key6, key7, key8);
29
37
  },
38
+ /** Curry out the first 9 parameters from the method */
30
39
  curry9: function (fn, key1, key2, key3, key4, key5, key6, key7, key8, key9) {
31
40
  return curryInner(fn, key1, key2, key3, key4, key5, key6, key7, key8, key9);
32
41
  },
42
+ /** Curry out the first 10 parameters from the method */
33
43
  curry10: function (fn, key1, key2, key3, key4, key5, key6, key7, key8, key9, key10) {
34
44
  return curryInner(fn, key1, key2, key3, key4, key5, key6, key7, key8, key9, key10);
35
45
  },
46
+ /** Curry out the first 11 parameters from the method */
36
47
  curry11: function (fn, key1, key2, key3, key4, key5, key6, key7, key8, key9, key10, key11) {
37
48
  return curryInner(fn, key1, key2, key3, key4, key5, key6, key7, key8, key9, key10, key11);
38
49
  },
50
+ /** Curry out the first 12 parameters from the method */
39
51
  curry12: function (fn, key1, key2, key3, key4, key5, key6, key7, key8, key9, key10, key11, key12) {
40
52
  return curryInner(fn, key1, key2, key3, key4, key5, key6, key7, key8, key9, key10, key11, key12);
41
53
  },
54
+ /** Curry out the first 13 parameters from the method */
42
55
  curry13: function (fn, key1, key2, key3, key4, key5, key6, key7, key8, key9, key10, key11, key12, key13) {
43
56
  return curryInner(fn, key1, key2, key3, key4, key5, key6, key7, key8, key9, key10, key11, key12, key13);
44
57
  },
58
+ /** Curry out the first 14 parameters from the method */
45
59
  curry14: function (fn, key1, key2, key3, key4, key5, key6, key7, key8, key9, key10, key11, key12, key13, key14) {
46
60
  return curryInner(fn, key1, key2, key3, key4, key5, key6, key7, key8, key9, key10, key11, key12, key13, key14);
47
61
  },
62
+ /** Curry out the first 15 parameters from the method */
48
63
  curry15: function (fn, key1, key2, key3, key4, key5, key6, key7, key8, key9, key10, key11, key12, key13, key14, key15) {
49
64
  return curryInner(fn, key1, key2, key3, key4, key5, key6, key7, key8, key9, key10, key11, key12, key13, key14, key15);
50
65
  },
66
+ /** Curry out the first 16 parameters from the method */
51
67
  curry16: function (fn, key1, key2, key3, key4, key5, key6, key7, key8, key9, key10, key11, key12, key13, key14, key15, key16) {
52
68
  return curryInner(fn, key1, key2, key3, key4, key5, key6, key7, key8, key9, key10, key11, key12, key13, key14, key15, key16);
53
69
  },
70
+ /** Curry out the first 17 parameters from the method */
54
71
  curry17: function (fn, key1, key2, key3, key4, key5, key6, key7, key8, key9, key10, key11, key12, key13, key14, key15, key16, key17) {
55
72
  return curryInner(fn, key1, key2, key3, key4, key5, key6, key7, key8, key9, key10, key11, key12, key13, key14, key15, key16, key17);
56
73
  },
74
+ /** Curry out the first 18 parameters from the method */
57
75
  curry18: function (fn, key1, key2, key3, key4, key5, key6, key7, key8, key9, key10, key11, key12, key13, key14, key15, key16, key17, key18) {
58
76
  return curryInner(fn, key1, key2, key3, key4, key5, key6, key7, key8, key9, key10, key11, key12, key13, key14, key15, key16, key17, key18);
59
77
  },
78
+ /** Curry out the first 19 parameters from the method */
60
79
  curry19: function (fn, key1, key2, key3, key4, key5, key6, key7, key8, key9, key10, key11, key12, key13, key14, key15, key16, key17, key18, key19) {
61
80
  return curryInner(fn, key1, key2, key3, key4, key5, key6, key7, key8, key9, key10, key11, key12, key13, key14, key15, key16, key17, key18, key19);
62
81
  },
82
+ /** Curry out the first 20 parameters from the method */
63
83
  curry20: function (fn, key1, key2, key3, key4, key5, key6, key7, key8, key9, key10, key11, key12, key13, key14, key15, key16, key17, key18, key19, key20) {
64
84
  return curryInner(fn, key1, key2, key3, key4, key5, key6, key7, key8, key9, key10, key11, key12, key13, key14, key15, key16, key17, key18, key19, key20);
65
85
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rocketmakers/ioc",
3
- "version": "0.2.4",
3
+ "version": "0.2.6",
4
4
  "description": "",
5
5
  "main": "./lib/index.js",
6
6
  "scripts": {