DEV Community

loading...

Discussion on: Generic type guard in Typescript

Collapse
krumpet profile image
Ran Lottem Author

It's possible, but this universal type guard would have to have access to some type guard function specific to that interface. This could be done with some 'type guard dictionary's or by passing a function.

Forem Open with the Forem app