patron-oop 1.27.0 → 1.29.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,11 +0,0 @@
1
- import { FactoryType } from "./Factory";
2
-
3
- export class FactoryDynamic<T> implements FactoryType<T> {
4
- public constructor(private creationFn: (...args: unknown[]) => T) {}
5
-
6
- public create<R extends unknown[], CT = null>(
7
- ...args: R
8
- ): CT extends null ? T : CT {
9
- return this.creationFn(...args) as CT extends null ? T : CT;
10
- }
11
- }