Skip to content

Commit

Permalink
Use property injection (#220)
Browse files Browse the repository at this point in the history
fixed #216

Signed-off-by: Jonas Helming <[email protected]>
  • Loading branch information
JonasHelming authored Oct 8, 2024
1 parent e836458 commit a417a68
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions templates/hello-world/contribution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@ export const <%= params.extensionPrefix %>Command: Command = {

@injectable()
export class <%= params.extensionPrefix %>CommandContribution implements CommandContribution {

constructor(
@inject(MessageService) private readonly messageService: MessageService,
) { }

@inject(MessageService)
protected readonly messageService!: MessageService;

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

0 comments on commit a417a68

Please sign in to comment.