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

Update tsconfig.json #39

merged 2 commits into from
Jan 20, 2021

Conversation

UNDERHMA
Copy link

Adding "skipLibCheck": true to thetsconfig.json. When we were ng building, angular material was throwing the bug:

Error: node_modules/saturn-datepicker/datepicker/datepicker.d.ts:57:22 - error TS2420: Class 'SatDatepicker' incorrectly implementCanColor'.
Property 'defaultColor' is missing in type 'SatDatepicker' but required in type 'CanColor'.

57 export declare class SatDatepicker implements OnDestroy, CanColor {
~~~~~~~~~~~~~

node_modules/@angular/material/core/common-behaviors/color.d.ts:15:5
15 defaultColor: ThemePalette | undefined;
~~~~~~~~~~~~
'defaultColor' is declared here.

An imported library (saturn-datepicker) had a bug in one of its files that wasn't allowing it to compile with angular material:

SaturnTeam/saturn-datepicker#157

This issue was still outstanding, and the only options to fix this and compile our project was to either edit the node_modules by hand, which each user would need to do manually, or add "skipLibCheck": true to the tsconfig.json. Here is what this setting does:

"Enabling --skipLibCheck can help work around these issues. Turning it on will prevent Typescript from type-checking the entire imported libraries. Instead, Typescript will only type-check the code you use against these types. This means that as long as you aren't using the incompatible parts of imported libraries, they'll compile just fine."

-https://stackoverflow.com/questions/52311779/usage-of-the-typescript-compiler-argument-skiplibcheck

We also should add this to the README, so that future groups know we made this setting change.

@UNDERHMA
Copy link
Author

Added the update to the README

@UNDERHMA UNDERHMA merged commit 271f779 into main Jan 20, 2021
@UNDERHMA UNDERHMA deleted the UNDERHMA-patch-3 branch January 20, 2021 18:07
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 this pull request may close these issues.

2 participants