Skip to content

Commit

Permalink
refactor: mark more props readonly
Browse files Browse the repository at this point in the history
  • Loading branch information
exuanbo committed Oct 17, 2024
1 parent bf1fad0 commit 5ad98fc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ export type Provider<Value = any> =
| ValueProvider<Value>;

export interface ClassProvider<Instance extends object> {
useClass: Constructor<Instance>;
readonly useClass: Constructor<Instance>;
}

export interface FactoryProvider<Value> {
useFactory: (...args: []) => Value;
readonly useFactory: (...args: []) => Value;
}

export interface ValueProvider<T> {
useValue: T;
readonly useValue: T;
}

// @internal
Expand Down
4 changes: 2 additions & 2 deletions src/registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import {type Token, Type} from "./token";
export interface Registration<T = any> {
options?: RegistrationOptions;
instance?: InstanceRef<T>;
provider: Provider<T>;
readonly provider: Provider<T>;
}

export interface RegistrationOptions {
scope?: Scope;
readonly scope?: Scope;
}

export class Registry {
Expand Down

0 comments on commit 5ad98fc

Please sign in to comment.