From c61f581a79e50a39c78534ddb2817eb5ae3ea64d Mon Sep 17 00:00:00 2001 From: jdegand <70610011+jdegand@users.noreply.github.com> Date: Sat, 30 Mar 2024 22:50:49 -0400 Subject: [PATCH] refactor: add typing and remove deprecated keycode method --- .../default-onpush/src/app/person-list.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/performance/default-onpush/src/app/person-list.component.ts b/apps/performance/default-onpush/src/app/person-list.component.ts index c4f5569..04574d5 100644 --- a/apps/performance/default-onpush/src/app/person-list.component.ts +++ b/apps/performance/default-onpush/src/app/person-list.component.ts @@ -59,8 +59,8 @@ export class PersonListComponent { label = ''; - handleKey(event: any) { - if (event.keyCode === 13) { + handleKey(event: KeyboardEvent) { + if (event.key === 'Enter') { this.names?.unshift(this.label); this.label = ''; }