DenoDDeno
Powered by
abiA
Denoβ€’3y agoβ€’
8 replies
abi

Type alias with inherited type parameter constraints

Is there any way to do this? I want SVLTN to just be a short-name alias for SomeVeryLongTypeName, and I want it to have the same parameter types, but I don't want to have to specify all of them explicitly.

type SomeVeryLongTypeName<A extends ..., B extends ..., ...> = ...
type SVLTN<A extends ..., B extends ..., ...> = SomeVeryLongTypeName<A, B, ...>
type SomeVeryLongTypeName<A extends ..., B extends ..., ...> = ...
type SVLTN<A extends ..., B extends ..., ...> = SomeVeryLongTypeName<A, B, ...>


What I would like more is:

type SVLTN = SomeVeryLongTypeName<???>
type SVLTN = SomeVeryLongTypeName<???>


Anyone?
Deno banner
DenoJoin
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,934Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

No Auto Complete Suggestions for `@/` Alias in Deno with VSCode
PhilPPhil / help
2y ago
Issues with Type Stripping
SebastianSSebastian / help
7mo ago
Type checking with tanstack router
Steve ASSteve A / help
7mo ago