| ▲ | culi a day ago | |||||||
JSDoc actually has the @extends tag
But I don't really use that feature in TypeScript. Instead I rely on `&`. This works in exactly the same way in JSDoc.Also if you're curious about the equivalent of `extends` in generic slots, here's an example I have from a different project
The generic slot here, T, is "extended" by Record<string, unknown>. The equivalent in TypeScript would look like | ||||||||
| ▲ | llimllib a day ago | parent | next [-] | |||||||
the equivalent in typescript would be "export type" not just "type", since as I pointed out that type is exported without you being able to control it | ||||||||
| ▲ | KPGv2 a day ago | parent | prev [-] | |||||||
I don't understand why someone would opt for "write Typescript, but add a bunch of extra characters, make the syntax clunkier, and throw away all the benefits of compile-time errors because we'd rather have runtime errors" in order to save, what, a microsecond stripping typescript out of TS files? Everyone's complaining about "the build step" but the build step is just an eye blink of stripping out some things that match a regex. | ||||||||
| ||||||||