Fix selection visible property declaration #22
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "master"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The usage of
!in property declaration causes inconsistent TS compiler output, depending on theuseDefineForClassFieldscompiler flag. If theuseDefineForClassFieldsflag istrue-selection.visibleproperty will resolve toundefined, as the prototype value is being overwritten in the class constructor.Since the
!is here only to declare that the property exists, and not to assume not-nullness -> it would be more appropriate to usedeclarestatement instead. This is also a prevention of a future problem when TS switches touseDefineForClassFieldsas a default compiler behavior.Fortunately, this code isn't being compiled with
useDefineForClassFields: true, so there is no need to make this change.Pull request closed