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
If we had a writeonly modifier, I'd argue we could just use that as a parallel to the readonly declaration; however, we do support accessors in declaration emit, and we could emit that in the case of a write-only accessor.
It is technically a breaking change though for consumers of older TypeScript versions, and the only way to opt out would be to declare a no-op get accessor.
Playground Link
Related to #58112 (comment)
Current
Notice that in the declaration of
writeonly
, we don't preserve the accessor at all.Expected
If we had a
writeonly
modifier, I'd argue we could just use that as a parallel to thereadonly
declaration; however, we do support accessors in declaration emit, and we could emit that in the case of a write-only accessor.It is technically a breaking change though for consumers of older TypeScript versions, and the only way to opt out would be to declare a no-op
get
accessor.The text was updated successfully, but these errors were encountered: