Skip to content

Commit e2a7a03

Browse files
committed
fix(di): keep the commandRegistry name
Hooks can take $commandRegistry since 9.1.0, and one that does would be skipped without the name.
1 parent 132fe87 commit e2a7a03

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎lib/common/contracts/command-registry.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export type DeferredCommandResult =
8484
* facade later is a provider swap for this token, not a consumer migration.
8585
* Members slated for replacement keep their deprecation markers.
8686
*/
87-
@Contract()
87+
@Contract({ name: "commandRegistry" })
8888
export abstract class CommandRegistry {
8989
/**
9090
* @deprecated Path-based command registration; use registerDeferredCommand,

‎test/compat/injector-facade-surface.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ describe("injector facade surface", () => {
104104
for (const token of [CommandRegistry, ModuleRegistry, PublicApiBuilder]) {
105105
assert.strictEqual(inj.get(<any>token), inj);
106106
}
107-
assert.isFalse(inj.has("commandRegistry"));
107+
assert.strictEqual(inj.resolve("commandRegistry"), inj);
108108

109109
runInInjectionContext(inj, () => {
110110
assert.strictEqual(inject(CommandRegistry), inj);

0 commit comments

Comments
 (0)