Open JoshuaKGoldberg opened 2 years ago
A question brought up on my Twitch stream today: overriding types of third party libraries if the types aren't made to be extended?
Example: some-library exports an interface MyData, and in your code you need to have an extra property myProperty added to all instances of MyData?
some-library
MyData
myProperty
A more specific example: https://github.com/versatica/mediasoup/blob/41e2f52786a61942209512ca5ce20798baad8b96/node/lib/Worker.d.ts#L39
Thanks voltaryx on Twitch for bringing up! 🙌
See also: https://twitter.com/phunkren/status/1561794275855241216
A question brought up on my Twitch stream today: overriding types of third party libraries if the types aren't made to be extended?
Example:
some-library
exports an interfaceMyData
, and in your code you need to have an extra propertymyProperty
added to all instances ofMyData
?A more specific example: https://github.com/versatica/mediasoup/blob/41e2f52786a61942209512ca5ce20798baad8b96/node/lib/Worker.d.ts#L39
Thanks voltaryx on Twitch for bringing up! 🙌