Skip to content

Commit e239161

Browse files
committed
save
1 parent f16b6e4 commit e239161

23 files changed

+98
-126
lines changed

package-lock.json

+5-13
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/api-console-gui/src/app/components/inputs/registry.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,5 @@ inputRegistry.set(type => {
4646
return isMapType(type);
4747
}, MapInputComponent);
4848
inputRegistry.set(type => {
49-
return type.kind === ReflectionKind.class && getClassName(getClassType(type)) === 'UploadedFile';
49+
return type.kind === ReflectionKind.class && getClassName(type.classType) === 'UploadedFile';
5050
}, BinaryInputComponent);

packages/api-console-gui/src/app/utils.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export function isReferenceLike(type: Type): boolean {
2020
}
2121

2222
function manualTypeStringify(type: Type): string | undefined {
23-
if (type.kind === ReflectionKind.class && getClassName(getClassType(type)) === 'UploadedFile') return 'UploadedFile';
23+
if (type.kind === ReflectionKind.class && getClassName(type.classType) === 'UploadedFile') return 'UploadedFile';
2424
//we are not interested in the methods
2525
if (type.kind === ReflectionKind.method || type.kind === ReflectionKind.methodSignature) return '';
2626
return;

packages/bson/src/bson-parser.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ export class BaseParser {
159159
return nodeBufferToArrayBuffer(b);
160160
}
161161
if (type && type.kind === ReflectionKind.class) {
162-
const typedArrayConstructor = getClassType(type);
162+
const typedArrayConstructor = type.classType;
163163
return new typedArrayConstructor(nodeBufferToArrayBuffer(b));
164164
}
165165

packages/injector/src/injector.ts

+10-10
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@ export class Injector implements InjectorInterface {
609609
const destinationVar = compiler.reserveConst({ token: fromProvider.provide });
610610

611611
if (options.type.kind === ReflectionKind.class) {
612-
const found = findModuleForConfig(getClassType(options.type), resolveDependenciesFrom);
612+
const found = findModuleForConfig(options.type.classType, resolveDependenciesFrom);
613613
if (found) {
614614
return compiler.reserveVariable('fullConfig', getPathValue(found.module.getConfig(), found.path));
615615
}
@@ -629,14 +629,14 @@ export class Injector implements InjectorInterface {
629629
return compiler.reserveVariable('tagRegistry', this.buildContext.tagRegistry);
630630
}
631631

632-
if (options.type.kind === ReflectionKind.class && resolveDependenciesFrom[0] instanceof getClassType(options.type)) {
632+
if (options.type.kind === ReflectionKind.class && resolveDependenciesFrom[0] instanceof options.type.classType) {
633633
return compiler.reserveConst(resolveDependenciesFrom[0], 'module');
634634
}
635635

636636
if (options.type.kind === ReflectionKind.class && isPrototypeOfBase(options.type.classType, Tag)) {
637637
const tokenVar = compiler.reserveVariable('token', options.type.classType);
638638
const resolvedVar = compiler.reserveVariable('tagResolved');
639-
const entries = this.buildContext.tagRegistry.resolve(getClassType(options.type));
639+
const entries = this.buildContext.tagRegistry.resolve(options.type.classType);
640640
const args: string[] = [];
641641
for (const entry of entries) {
642642
args.push(`${compiler.reserveConst(entry.module)}.injector.resolver(${compiler.reserveConst(getContainerToken(entry.tagProvider.provider.provide))}, scope, ${destinationVar})`);
@@ -655,7 +655,7 @@ export class Injector implements InjectorInterface {
655655
const pickArguments = getPickArguments(options.type);
656656
if (pickArguments) {
657657
if (pickArguments[0].kind === ReflectionKind.class) {
658-
const found = findModuleForConfig(getClassType(pickArguments[0]), resolveDependenciesFrom);
658+
const found = findModuleForConfig(pickArguments[0].classType, resolveDependenciesFrom);
659659
if (found) {
660660
const fullConfig = compiler.reserveVariable('fullConfig', getPathValue(found.module.getConfig(), found.path));
661661
let index = pickArguments[1];
@@ -778,24 +778,24 @@ export class Injector implements InjectorInterface {
778778
// }
779779

780780
if (type.kind === ReflectionKind.class) {
781-
const found = findModuleForConfig(getClassType(type), resolveDependenciesFrom);
781+
const found = findModuleForConfig(type.l, resolveDependenciesFrom);
782782
if (found) return () => getPathValue(found.module.getConfig(), found.path);
783783
}
784784

785785
if (type.kind === ReflectionKind.class && type.classType === TagRegistry) return () => this.buildContext.tagRegistry;
786786

787-
if (type.kind === ReflectionKind.class && resolveDependenciesFrom[0] instanceof getClassType(type)) {
787+
if (type.kind === ReflectionKind.class && resolveDependenciesFrom[0] instanceof type.classType) {
788788
return () => resolveDependenciesFrom[0];
789789
}
790790

791791
if (type.kind === ReflectionKind.class && isPrototypeOfBase(type.classType, Tag)) {
792-
const entries = this.buildContext.tagRegistry.resolve(getClassType(type));
792+
const entries = this.buildContext.tagRegistry.resolve(type.classType);
793793
const args: any[] = [];
794794
for (const entry of entries) {
795795
args.push(entry.module.injector!.resolver!(entry.tagProvider.provider.provide, scope));
796796
}
797797

798-
return new (getClassType(type))(args);
798+
return new (type.classType)(args);
799799
}
800800

801801
if (type.kind === ReflectionKind.function && type.typeName === 'PartialFactory') {
@@ -809,7 +809,7 @@ export class Injector implements InjectorInterface {
809809
const pickArguments = getPickArguments(type);
810810
if (pickArguments) {
811811
if (pickArguments[0].kind === ReflectionKind.class) {
812-
const found = findModuleForConfig(getClassType(pickArguments[0]), resolveDependenciesFrom);
812+
const found = findModuleForConfig(pickArguments[0].classType, resolveDependenciesFrom);
813813
if (found) {
814814
const fullConfig = getPathValue(found.module.getConfig(), found.path);
815815
let index = pickArguments[1];
@@ -1027,7 +1027,7 @@ export function partialFactory(
10271027
}
10281028

10291029
if (type.kind === ReflectionKind.class) {
1030-
const classType = getClassType(type);
1030+
const classType = type.classType;
10311031
const reflectionClass = ReflectionClass.from(classType);
10321032

10331033
const args: { name: string; resolve: (scope?: Scope) => ReturnType<Resolver<any>> }[] = [];

packages/orm-browser-gui/src/app/registry.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ inputRegistry.set(isMongoIdType, StringInputComponent);
4343
// return isMapType(type);
4444
// }, MapInputComponent);
4545
inputRegistry.set(type => {
46-
return type.kind === ReflectionKind.class && getClassName(getClassType(type)) === 'UploadedFile';
46+
return type.kind === ReflectionKind.class && getClassName(type.classType) === 'UploadedFile';
4747
}, BinaryInputComponent);
4848

4949

@@ -81,5 +81,5 @@ cellRegistry.set(isMongoIdType, StringCellComponent);
8181
// return isMapType(type);
8282
// }, MapCellComponent);
8383
cellRegistry.set(type => {
84-
return type.kind === ReflectionKind.class && getClassName(getClassType(type)) === 'UploadedFile';
84+
return type.kind === ReflectionKind.class && getClassName(type.classType) === 'UploadedFile';
8585
}, BinaryCellComponent);

packages/sql/src/platform/default-platform.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ export abstract class DefaultPlatform {
130130

131131
addBinaryType(sqlType: string, size?: number, scale?: number) {
132132
this.addType((type: Type) => {
133-
return type.kind === ReflectionKind.class && binaryTypes.includes(getClassType(type));
133+
return type.kind === ReflectionKind.class && binaryTypes.includes(type.classType);
134134
}, sqlType, size, scale);
135135
}
136136

0 commit comments

Comments
 (0)