Commit 8b1eceb6 authored by nanahira's avatar nanahira

remove provideKey

parent d14dab9a
...@@ -24,7 +24,6 @@ const getMethodDescriptor = (cls: AnyClass, key: PropertyKey) => { ...@@ -24,7 +24,6 @@ const getMethodDescriptor = (cls: AnyClass, key: PropertyKey) => {
type ProvideRecord = { type ProvideRecord = {
classRef: AnyClass; classRef: AnyClass;
factory: () => any; factory: () => any;
provideKey?: string;
}; };
type LoadEntry = { type LoadEntry = {
...@@ -71,9 +70,6 @@ export class AppContextCore<Cur = Empty, Req = Empty> { ...@@ -71,9 +70,6 @@ export class AppContextCore<Cur = Empty, Req = Empty> {
) as ConstructorParameters<C>; ) as ConstructorParameters<C>;
const classRef = cls as unknown as AnyClass; const classRef = cls as unknown as AnyClass;
const provideKey = options?.provide
? ProvidePrefix + String(options.provide)
: undefined;
// Create factory function that will be called during start() // Create factory function that will be called during start()
const factory = () => const factory = () =>
...@@ -86,7 +82,6 @@ export class AppContextCore<Cur = Empty, Req = Empty> { ...@@ -86,7 +82,6 @@ export class AppContextCore<Cur = Empty, Req = Empty> {
this.provideRecords.push({ this.provideRecords.push({
classRef, classRef,
factory, factory,
provideKey,
}); });
// Set up property accessors if needed // Set up property accessors if needed
...@@ -233,9 +228,6 @@ export class AppContextCore<Cur = Empty, Req = Empty> { ...@@ -233,9 +228,6 @@ export class AppContextCore<Cur = Empty, Req = Empty> {
inst, inst,
}; };
this.registry.set(record.classRef, entry); this.registry.set(record.classRef, entry);
if (record.provideKey) {
this.registry.set(record.provideKey, entry);
}
this.loadSeq.push(entry); this.loadSeq.push(entry);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment