-
Notifications
You must be signed in to change notification settings - Fork 34
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
Migrating to stricter TypeScript #285
Labels
blocked
Blocked by external dependency or problem
enhancement
New feature or request
tech debt
The update/fix/change is overdue
Comments
Merged
darkwebdev
added a commit
that referenced
this issue
Nov 15, 2023
darkwebdev
added a commit
that referenced
this issue
Nov 15, 2023
darkwebdev
added a commit
that referenced
this issue
Nov 16, 2023
darkwebdev
added a commit
that referenced
this issue
Nov 16, 2023
darkwebdev
added a commit
that referenced
this issue
Nov 16, 2023
darkwebdev
added
enhancement
New feature or request
tech debt
The update/fix/change is overdue
labels
Nov 16, 2023
darkwebdev
added a commit
that referenced
this issue
Nov 16, 2023
darkwebdev
added a commit
that referenced
this issue
Nov 22, 2023
darkwebdev
added a commit
that referenced
this issue
Dec 21, 2023
HenriqueLimas
pushed a commit
that referenced
this issue
Dec 21, 2023
Development blocked by the weird bug where icon is rendered two times, but not in dev environment. hard to reproduce and debug... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
blocked
Blocked by external dependency or problem
enhancement
New feature or request
tech debt
The update/fix/change is overdue
Problems
Currently, we are compiling UI Core React without strict mode
ebayui-core-react/tsconfig.json
Line 17 in abd3bb3
This means we will not get compilation error on many things when building ui-core-react. However, this might cause problems when the project that consumes ui-core-react use strict mode.
Solution
We need to enable strict mode on our TypeScript. However, this would cause 250+ compilation errors (v5.6.2) if we just set
strict: true
on tsconfig.Therefore we need to incrementally enable strict mode and fix them gradually.
Options for Incremental Migration to TypeScript Strict Mode
Generally, one need to:
strict: true
on tsconfig, which actually enabling at least 5 strict mode family optionsSee details on this article: https://www.bitovi.com/blog/how-to-incrementally-migrate-an-angular-project-to-typescript-strict-mode
Other techniques:
Plan by Tim:
Step 1
strictBindCallApply
useUnknownInCatchVariables
noImplicitThis
alwaysStrict
Step 2
strictFunctionTypes
21 errorsStep 3
strictNullChecks
150+ errorsstrictPropertyInitialization
requiresstrictNullChecks
Step 4
noImplicitAny
300+ errorsThe text was updated successfully, but these errors were encountered: