stable

Clone or download

Read-only

Replace type assertions by runtime checks when accessing the DOM

Actually doing the check is not really that much work in comparison of doing the type assertion and disabling the linter. Also it gives the opportunity to throw an helpful error when we encounter an unexpected state which is better than having to debug error like "Cannot access foo of undefined L4532". Being forced to always disable the tooling to do something shows that either the tooling is misconfigured and needs to be fixed or that there is a need for a better solution. Systematically disabling it is not an acceptable solution because it sends the message that it is fine to not trust the results and that we just can ignore them each time they are annoying us. Part of story #14552: User preferences goes Burning Parrot Change-Id: I9b7669a5f1d56ca3b73667869b5a819bc02f2ed7

Modified Files

Name
M src/www/scripts/account/appearance.ts +6 −12 Go to diff View file
M src/www/scripts/account/keys-tokens.ts +32 −29 Go to diff View file
M src/www/scripts/account/security.ts +5 −2 Go to diff View file