lacolaco / zenn

https://zenn.dev/lacolaco のソースファイルを管理するリポジトリ

Home Page:https://zenn.dev/lacolaco

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error: no initializer and is not definitely assigned in the constructor.

yuki-katayama opened this issue · comments

1-1: UserListItemComponent の分割にある

export class UserListItemComponent {
  @Input()
  user: User;
}

ここで以下のエラーが出力されたので

Property 'user' has no initializer and is not definitely assigned in the constructor.

以下に直したらできました。

user!:User

報告ありがとうございます! #6 と合わせて、執筆当時と今のAngularのデフォルトのtsconfig設定が変わっているので、strict基準で9月中にまとめて修正します!