test(compiler): fix unwanted `!` operators (#36741)

The `I18nComponent` was using `!` for some of its properties
because it had not initialized them. This is now resolved by explictly
marking them as optional.

PR Close #36741
This commit is contained in:
Pete Bacon Darwin 2020-04-27 12:18:53 +01:00 committed by Andrew Kushnir
parent e0aa39929b
commit aa0dd0d5ff
1 changed files with 3 additions and 6 deletions

View File

@ -19,12 +19,9 @@ import {expect} from '@angular/platform-browser/testing/src/matchers';
template: '', template: '',
}) })
export class I18nComponent { export class I18nComponent {
// TODO(issue/24571): remove '!'. count?: number;
count!: number; sex?: string;
// TODO(issue/24571): remove '!'. sexB?: string;
sex!: string;
// TODO(issue/24571): remove '!'.
sexB!: string;
response: any = {getItemsList: (): any[] => []}; response: any = {getItemsList: (): any[] => []};
} }