ts-ioc-container 23.1.4 → 23.1.5

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.
@@ -1,3 +1,2 @@
1
1
  export declare const setProp: <T>(key: string | symbol, value: T) => ClassDecorator;
2
- export declare const reduceProp: <T>(key: string | symbol, fn: (acc: T) => T, init: T) => ClassDecorator;
3
2
  export declare function getProp<T>(target: Object, key: string | symbol): T | undefined;
package/cjm/reflection.js CHANGED
@@ -1,20 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getProp = exports.reduceProp = exports.setProp = void 0;
3
+ exports.getProp = exports.setProp = void 0;
4
4
  var setProp = function (key, value) {
5
5
  return function (target) {
6
6
  Reflect.defineMetadata(key, value, target);
7
7
  };
8
8
  };
9
9
  exports.setProp = setProp;
10
- var reduceProp = function (key, fn, init) {
11
- return function (target) {
12
- var _a;
13
- var current = (_a = Reflect.getOwnMetadata(key, target)) !== null && _a !== void 0 ? _a : init;
14
- Reflect.defineMetadata(key, fn(current), target);
15
- };
16
- };
17
- exports.reduceProp = reduceProp;
18
10
  // eslint-disable-next-line @typescript-eslint/ban-types
19
11
  function getProp(target, key) {
20
12
  return Reflect.getOwnMetadata(key, target);
@@ -1 +1 @@
1
- {"version":3,"file":"reflection.js","sourceRoot":"","sources":["../lib/reflection.ts"],"names":[],"mappings":";;;AAAO,IAAM,OAAO,GAChB,UAAI,GAAoB,EAAE,KAAQ;IAClC,OAAA,UAAC,MAAM;QACH,OAAO,CAAC,cAAc,CAAC,GAAG,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;IAC/C,CAAC;AAFD,CAEC,CAAC;AAJO,QAAA,OAAO,WAId;AAEC,IAAM,UAAU,GACnB,UAAI,GAAoB,EAAE,EAAiB,EAAE,IAAO;IACpD,OAAA,UAAC,MAAM;;QACH,IAAM,OAAO,GAAM,MAAA,OAAO,CAAC,cAAc,CAAC,GAAG,EAAE,MAAM,CAAC,mCAAI,IAAI,CAAC;QAC/D,OAAO,CAAC,cAAc,CAAC,GAAG,EAAE,EAAE,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,CAAC;IACrD,CAAC;AAHD,CAGC,CAAC;AALO,QAAA,UAAU,cAKjB;AAEN,wDAAwD;AACxD,SAAgB,OAAO,CAAI,MAAc,EAAE,GAAoB;IAC3D,OAAO,OAAO,CAAC,cAAc,CAAC,GAAG,EAAE,MAAM,CAAM,CAAC;AACpD,CAAC;AAFD,0BAEC"}
1
+ {"version":3,"file":"reflection.js","sourceRoot":"","sources":["../lib/reflection.ts"],"names":[],"mappings":";;;AAAO,IAAM,OAAO,GAChB,UAAI,GAAoB,EAAE,KAAQ;IAClC,OAAA,UAAC,MAAM;QACH,OAAO,CAAC,cAAc,CAAC,GAAG,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;IAC/C,CAAC;AAFD,CAEC,CAAC;AAJO,QAAA,OAAO,WAId;AAEN,wDAAwD;AACxD,SAAgB,OAAO,CAAI,MAAc,EAAE,GAAoB;IAC3D,OAAO,OAAO,CAAC,cAAc,CAAC,GAAG,EAAE,MAAM,CAAM,CAAC;AACpD,CAAC;AAFD,0BAEC"}
@@ -1,3 +1,2 @@
1
1
  export declare const setProp: <T>(key: string | symbol, value: T) => ClassDecorator;
2
- export declare const reduceProp: <T>(key: string | symbol, fn: (acc: T) => T, init: T) => ClassDecorator;
3
2
  export declare function getProp<T>(target: Object, key: string | symbol): T | undefined;
package/esm/reflection.js CHANGED
@@ -1,11 +1,6 @@
1
1
  export const setProp = (key, value) => (target) => {
2
2
  Reflect.defineMetadata(key, value, target);
3
3
  };
4
- export const reduceProp = (key, fn, init) => (target) => {
5
- var _a;
6
- const current = (_a = Reflect.getOwnMetadata(key, target)) !== null && _a !== void 0 ? _a : init;
7
- Reflect.defineMetadata(key, fn(current), target);
8
- };
9
4
  // eslint-disable-next-line @typescript-eslint/ban-types
10
5
  export function getProp(target, key) {
11
6
  return Reflect.getOwnMetadata(key, target);
@@ -1 +1 @@
1
- {"version":3,"file":"reflection.js","sourceRoot":"","sources":["../lib/reflection.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAChB,CAAI,GAAoB,EAAE,KAAQ,EAAkB,EAAE,CACtD,CAAC,MAAM,EAAE,EAAE;IACP,OAAO,CAAC,cAAc,CAAC,GAAG,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;AAC/C,CAAC,CAAC;AAEN,MAAM,CAAC,MAAM,UAAU,GACnB,CAAI,GAAoB,EAAE,EAAiB,EAAE,IAAO,EAAkB,EAAE,CACxE,CAAC,MAAM,EAAE,EAAE;;IACP,MAAM,OAAO,GAAM,MAAA,OAAO,CAAC,cAAc,CAAC,GAAG,EAAE,MAAM,CAAC,mCAAI,IAAI,CAAC;IAC/D,OAAO,CAAC,cAAc,CAAC,GAAG,EAAE,EAAE,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,CAAC;AACrD,CAAC,CAAC;AAEN,wDAAwD;AACxD,MAAM,UAAU,OAAO,CAAI,MAAc,EAAE,GAAoB;IAC3D,OAAO,OAAO,CAAC,cAAc,CAAC,GAAG,EAAE,MAAM,CAAM,CAAC;AACpD,CAAC"}
1
+ {"version":3,"file":"reflection.js","sourceRoot":"","sources":["../lib/reflection.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAChB,CAAI,GAAoB,EAAE,KAAQ,EAAkB,EAAE,CACtD,CAAC,MAAM,EAAE,EAAE;IACP,OAAO,CAAC,cAAc,CAAC,GAAG,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;AAC/C,CAAC,CAAC;AAEN,wDAAwD;AACxD,MAAM,UAAU,OAAO,CAAI,MAAc,EAAE,GAAoB;IAC3D,OAAO,OAAO,CAAC,cAAc,CAAC,GAAG,EAAE,MAAM,CAAM,CAAC;AACpD,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ts-ioc-container",
3
- "version": "23.1.4",
3
+ "version": "23.1.5",
4
4
  "description": "Typescript IoC container",
5
5
  "author": "ibabkin <igba14@gmail.com>",
6
6
  "homepage": "https://github.com/IgorBabkin/ts-ioc-container/tree/master/packages/ts-ioc-container",
@@ -48,5 +48,5 @@
48
48
  "ts-jest": "27.0.5",
49
49
  "typescript": "4.4.3"
50
50
  },
51
- "gitHead": "d5ea5d9609560345eeeea698fee77af7b91c6a75"
51
+ "gitHead": "2b3ee5af5ef3de0feae9e4a521ce129c74e1a3cc"
52
52
  }