Skip to content

Commit 4a82216

Browse files
committed
fix: typo
1 parent 1a0047f commit 4a82216

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

src/base/common/instantiation/instantiation.ts

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
import { type interfaces, LazyServiceIdentifer } from 'inversify';
1+
import { type interfaces, LazyServiceIdentifier } from 'inversify';
22

33
export type Newable<T> = interfaces.Newable<T>;
44

55
export type ServiceIdentifier<T> = interfaces.ServiceIdentifier<T>;
66

77
export type FactoryFunction<T> = () => interfaces.ServiceIdentifier<T>;
88

9-
export type ServiceDescriptor<T> = T | LazyServiceIdentifer<T> | FactoryFunction<T>;
9+
export type ServiceDescriptor<T> = T | LazyServiceIdentifier<T> | FactoryFunction<T>;
1010

11-
export { LazyServiceIdentifer };
11+
export { LazyServiceIdentifier };
1212

1313
export interface ServicesAccessor {
1414
get<T>(id: ServiceIdentifier<T>): T;
1515
}
1616

1717
const _registry: [ServiceIdentifier<unknown>, ServiceDescriptor<unknown>][] = [];
1818

19-
export function registerSingleton<T>(id: ServiceIdentifier<T>, useValue: T | LazyServiceIdentifer<T>): void;
19+
export function registerSingleton<T>(id: ServiceIdentifier<T>, useValue: T | LazyServiceIdentifier<T>): void;
2020
export function registerSingleton<T>(id: ServiceIdentifier<T>, useFactory: FactoryFunction<T>): void;
2121
export function registerSingleton<T>(
2222
id: ServiceIdentifier<T>,
@@ -25,16 +25,16 @@ export function registerSingleton<T>(
2525
): void;
2626
export function registerSingleton<T>(
2727
id: ServiceIdentifier<T>,
28-
ctorOrDescriptor: T | LazyServiceIdentifer<T> | Newable<T> | FactoryFunction<T>,
28+
ctorOrDescriptor: T | LazyServiceIdentifier<T> | Newable<T> | FactoryFunction<T>,
2929
supportsDelayedInstantiation?: boolean,
3030
): void {
31-
if (ctorOrDescriptor instanceof LazyServiceIdentifer) {
31+
if (ctorOrDescriptor instanceof LazyServiceIdentifier) {
3232
_registry.push([id, ctorOrDescriptor]);
3333
return;
3434
}
3535

3636
if (typeof ctorOrDescriptor === 'function' && supportsDelayedInstantiation) {
37-
_registry.push([id, new LazyServiceIdentifer<T>(() => ctorOrDescriptor as Newable<T>)]);
37+
_registry.push([id, new LazyServiceIdentifier<T>(() => ctorOrDescriptor as Newable<T>)]);
3838
return;
3939
}
4040

src/base/common/instantiation/instantiationService.ts

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
import { Container, type interfaces, LazyServiceIdentifer } from 'inversify';
1+
import { Container, type interfaces, LazyServiceIdentifier } from 'inversify';
2+
3+
24

35
import { isDisposable } from '../lifecycle';
46
import { getSingletonServiceDescriptors, type ServiceIdentifier } from './instantiation';
57

8+
69
export const providerContainer = new Container();
710

811
export class InstantiationService {
@@ -13,7 +16,7 @@ export class InstantiationService {
1316
for (const [identifier, descriptor] of getSingletonServiceDescriptors()) {
1417
const binding = providerContainer.bind(identifier);
1518

16-
if (descriptor instanceof LazyServiceIdentifer) {
19+
if (descriptor instanceof LazyServiceIdentifier) {
1720
binding.toDynamicValue(() => descriptor.unwrap()).inSingletonScope();
1821
} else {
1922
binding.toConstantValue(descriptor);
@@ -104,4 +107,4 @@ export class InstantiationService {
104107
throw new Error('InstantiationService has been disposed');
105108
}
106109
}
107-
}
110+
}

0 commit comments

Comments
 (0)