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
Using marker interfaces in a structurally typed language like TypeScript has zero value. It cannot be told apart other empty things and makes it more cumbersome for extension authors. For custom documents and the onDidChange-event it is enough to have this
Can you explain how it be more any cumbersome for extension authors?
Sure. First, it is a new concept which we have never used before and that by itself adds complexity. Then, you need to write emitter.fire({}) instead of emitter.fire() - the ladder is enough to express what we need to know - which in return means the former isn't needed.
Ideally TS would allow us to define these as overload instead of or-types. That would make the whole documentation indirection obsolete.
I don't think you can document overloads of a property in TS> All the documentation will have to go into one documentation block
The current API is what we agreed to as a group. It's fine with me to switch it, but I want to make sure we have thought it through. The current design also has the advantages I noted: documentation and extensibility if needed
Using marker interfaces in a structurally typed language like TypeScript has zero value. It cannot be told apart other empty things and makes it more cumbersome for extension authors. For custom documents and the
onDidChange
-event it is enough to have thisThe text was updated successfully, but these errors were encountered: