You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.
I open this discussion for potential future references.
lint/useLiteralKeys enforces the use of static property access over computed property access.
formatter/quoteProperties=preserve ensures that the formatter does not turn a quoted property into an unquoted one. This aims to avoid name mangling in aggressive minifiers such as Google Closure. In this case, all quoted properties should be accessed with a computed property access. This conflicts with lint/useLiteralKeys.
Note: I noticed that the Google TypeScript Guide discourages the use of quoted properties and computed property access. It seems to recommend a new pattern to avoid name mangling. I did not find any reference of this pattern in Google Closure docs. This could make formatter/quoteProperties=preserve obsolete.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I open this discussion for potential future references.
lint/useLiteralKeys
enforces the use of static property access over computed property access.formatter/quoteProperties=preserve
ensures that the formatter does not turn a quoted property into an unquoted one. This aims to avoid name mangling in aggressive minifiers such as Google Closure. In this case, all quoted properties should be accessed with a computed property access. This conflicts withlint/useLiteralKeys
.Note: I noticed that the Google TypeScript Guide discourages the use of quoted properties and computed property access. It seems to recommend a new pattern to avoid name mangling. I did not find any reference of this pattern in Google Closure docs. This could make
formatter/quoteProperties=preserve
obsolete.Beta Was this translation helpful? Give feedback.
All reactions