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

Update tsconfig.json #39

Merged
merged 2 commits into from
Jan 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,5 +80,17 @@ If you haven't opened a pull request before on Github follow the below instructi
6) Add @RevatureGentry and @KennethDavis391 as approvers to your request
7) Select open pull request and viola pull request in progress! Will and Kenneth will comment once they review and merge it in if there are no issues.

### Note on tsconfig.json "skipLibCheck": true setting:
An imported library (saturn-datepicker) that integrated with angular material had a bug in one of its files that caused ng build errors:
https://github.com/SaturnTeam/saturn-datepicker/issues/157

`Error: node_modules/saturn-datepicker/datepicker/datepicker.d.ts:57:22`

`node_modules/@angular/material/core/common-behaviors/color.d.ts:15:5`

To solve this issue, we could have edited the node_module file by hand, but that would be manual for all users. Instead, we set "skipLibCheck": true in the tsconfig.json, which stops Typescript type-checking for imported libraries and only type-checks the code used against imported library types. Please see the following article for more details:
https://stackoverflow.com/questions/52311779/usage-of-the-typescript-compiler-argument-skiplibcheck

If you are able to use a more recent version of saturn-datepicker or angular material, it may be worth it to try removing the "skipLibCheck": true setting and trying ng build. If you receive no errors, then this bug will have been fixed.
* * *

3 changes: 2 additions & 1 deletion chronicle-front/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
"lib": [
"es2018",
"dom"
]
],
"skipLibCheck": true
},
"angularCompilerOptions": {
"strictInjectionParameters": true,
Expand Down