@tsed/core 8.26.0 → 8.26.2

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.
@@ -12,6 +12,7 @@ import { nameOf } from "../utils/nameOf.js";
12
12
  export class UnsupportedDecoratorType extends Error {
13
13
  constructor(decorator, args) {
14
14
  super(UnsupportedDecoratorType.buildMessage(decorator, args));
15
+ this.name = "UNSUPPORTED_DECORATOR_TYPE";
15
16
  }
16
17
  static buildMessage(decorator, args) {
17
18
  const [target, propertyKey, index] = args;
@@ -58,9 +58,6 @@ export class AnyToPromise {
58
58
  this.#rejects = reject;
59
59
  });
60
60
  }
61
- isDone() {
62
- return this.status !== AnyToPromiseStatus.PENDING;
63
- }
64
61
  get next() {
65
62
  this.#hasNextFunction = true;
66
63
  return (error) => {
@@ -70,6 +67,9 @@ export class AnyToPromise {
70
67
  return error ? this.reject(error) : this.resolve({ type: AnyToPromiseResponseTypes.DATA });
71
68
  };
72
69
  }
70
+ isDone() {
71
+ return this.status !== AnyToPromiseStatus.PENDING;
72
+ }
73
73
  /**
74
74
  *
75
75
  */
@@ -14,8 +14,11 @@ export function methodsOf(target) {
14
14
  ancestorsOf(target).forEach((target) => {
15
15
  const keys = Reflect.ownKeys(prototypeOf(target));
16
16
  keys.forEach((propertyKey) => {
17
- if (isSymbol(propertyKey) || propertyKey === "constructor" || Object.getOwnPropertyDescriptor(prototypeOf(target), propertyKey)?.get)
17
+ if (isSymbol(propertyKey) ||
18
+ propertyKey === "constructor" ||
19
+ Object.getOwnPropertyDescriptor(prototypeOf(target), propertyKey)?.get) {
18
20
  return;
21
+ }
19
22
  methods.set(propertyKey, { target, propertyKey });
20
23
  });
21
24
  });
@@ -112,7 +112,7 @@ export declare class Metadata {
112
112
  * ```
113
113
  *
114
114
  */
115
- static getType(target: any, propertyKey?: string | symbol): any;
115
+ static getType(target: Object, propertyKey?: string | symbol): any;
116
116
  /**
117
117
  * Gets the metadata value for the provided metadata DESIGN_TYPE on the target object or its prototype chain.
118
118
  * @param target The target object on which the metadata is defined.
@@ -141,7 +141,7 @@ export declare class Metadata {
141
141
  * ```
142
142
  *
143
143
  */
144
- static getOwnType(target: any, propertyKey?: string | symbol): any;
144
+ static getOwnType(target: Object, propertyKey?: string | symbol): any;
145
145
  /**
146
146
  * Gets the metadata value for the provided metadata DESIGN_RETURN_TYPE on the target object or its prototype chain.
147
147
  * @param target The target object on which the metadata is defined.
@@ -170,7 +170,7 @@ export declare class Metadata {
170
170
  * ```
171
171
  *
172
172
  */
173
- static getReturnType(target: any, propertyKey?: string | symbol): any;
173
+ static getReturnType(target: Object, propertyKey?: string | symbol): any;
174
174
  /**
175
175
  * Gets the metadata value for the provided metadata DESIGN_RETURN_TYPE on the target object or its prototype chain.
176
176
  * @param target The target object on which the metadata is defined.
@@ -199,7 +199,7 @@ export declare class Metadata {
199
199
  * ```
200
200
  *
201
201
  */
202
- static getOwnReturnType(target: any, propertyKey?: string | symbol): any;
202
+ static getOwnReturnType(target: Object, propertyKey?: string | symbol): any;
203
203
  /**
204
204
  * Gets a value indicating whether the target object or its prototype chain has the provided metadata key defined.
205
205
  * @param key A key used to store and retrieve metadata.
@@ -447,5 +447,5 @@ export declare class Metadata {
447
447
  * ```
448
448
  *
449
449
  */
450
- static getOwnParamTypes(target: any, propertyKey?: string | symbol): any[];
450
+ static getOwnParamTypes(target: Object, propertyKey?: string | symbol): any[];
451
451
  }
@@ -43,7 +43,7 @@ export declare class Store {
43
43
  * @param {string} propertyKey
44
44
  * @returns {Store}
45
45
  */
46
- static fromMethod(target: any, propertyKey: string | symbol): Store;
46
+ static fromMethod(target: Object, propertyKey: string | symbol): Store;
47
47
  static mergeStoreFrom(target: Type<any>, source: Type<any>, ...args: any[]): Store;
48
48
  static mergeStoreMethodFrom(target: Type<any>, source: Type<any>, propertyKey: string | symbol): Store;
49
49
  /**
@@ -50,12 +50,11 @@ export interface AnyPromiseResult<T = any> {
50
50
  export declare class AnyToPromise<T = any> {
51
51
  #private;
52
52
  status: AnyToPromiseStatus;
53
- args: any[];
54
53
  constructor({ hasNextFunction }?: {
55
54
  hasNextFunction?: boolean;
56
55
  });
57
- isDone(): boolean;
58
56
  get next(): (error?: any) => void;
57
+ isDone(): boolean;
59
58
  /**
60
59
  *
61
60
  */
@@ -4,4 +4,4 @@
4
4
  * @public
5
5
  * @since v7.0.0
6
6
  */
7
- export declare function isEnumerable(obj: any, key: string): any;
7
+ export declare function isEnumerable(obj: any, key: string): boolean | undefined;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@tsed/core",
3
3
  "description": "Core module for Ts.ED Framework",
4
4
  "type": "module",
5
- "version": "8.26.0",
5
+ "version": "8.26.2",
6
6
  "source": "./src/index.ts",
7
7
  "main": "./lib/esm/index.js",
8
8
  "module": "./lib/esm/index.js",
@@ -39,11 +39,11 @@
39
39
  "tslib": ">=2.7.0"
40
40
  },
41
41
  "devDependencies": {
42
- "@tsed/barrels": "8.26.0",
42
+ "@tsed/barrels": "8.26.2",
43
43
  "@tsed/monorepo-utils": "3.0.0",
44
- "@tsed/typescript": "8.26.0",
45
- "@tsed/vitest": "8.26.0",
46
- "typescript": "5.9.3",
44
+ "@tsed/typescript": "8.26.2",
45
+ "@tsed/vitest": "8.26.2",
46
+ "typescript": "6.0.2",
47
47
  "vitest": "3.2.4"
48
48
  },
49
49
  "peerDependencies": {},