Skip to content

Commit a417a68

Browse files
authored
Use property injection (#220)
fixed #216 Signed-off-by: Jonas Helming <[email protected]>
1 parent e836458 commit a417a68

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

templates/hello-world/contribution.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,9 @@ export const <%= params.extensionPrefix %>Command: Command = {
99

1010
@injectable()
1111
export class <%= params.extensionPrefix %>CommandContribution implements CommandContribution {
12-
13-
constructor(
14-
@inject(MessageService) private readonly messageService: MessageService,
15-
) { }
12+
13+
@inject(MessageService)
14+
protected readonly messageService!: MessageService;
1615

1716
registerCommands(registry: CommandRegistry): void {
1817
registry.registerCommand(<%= params.extensionPrefix %>Command, {

0 commit comments

Comments
 (0)