Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typescript compile error #9

Closed
gyusang opened this issue Feb 12, 2021 · 2 comments · Fixed by #10
Closed

Typescript compile error #9

gyusang opened this issue Feb 12, 2021 · 2 comments · Fixed by #10
Assignees

Comments

@gyusang
Copy link
Member

gyusang commented Feb 12, 2021

크롤러 프로젝트에서 Entity를 컴파일하던 중 다음 줄에서


Error:(16, 3) TS2564: Property 'id' has no initializer and is not definitely assigned in the constructor.
이 발생함을 확인했습니다.

microsoft/TypeScript-Vue-Starter#36
이 내용을 참고해 :!:으로 변경했더니 컴파일이 정상적으로 진행됐습니다.
이렇게 수정해야 할까요?

@gyusang
Copy link
Member Author

gyusang commented Feb 12, 2021

제가 tsconfig.json"strict": true를 설정해 두어서 에러가 보이는 것 같습니다.

const user: User = await this.findOne(id);

에서 'User | undefined Type을 User에 assign할 수 없다는 에러가 발생하고,
77, 81줄에서도 비슷한 에러가 발생합니다.

@eldpswp99
Copy link
Member

넵 내일 확인후에 수정하도록 하겠습니다!

gyusang added a commit that referenced this issue Feb 12, 2021
eldpswp99 added a commit that referenced this issue Feb 13, 2021
Modify entities to conform to strict rules
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants