extending type checker
unional opened this issue · 1 comments
unional commented
Something like:
import { pluginA } from 'plugin-a'
import { pluginB } from 'plugin-b'
const checker = T.createChecker(pluginA, pluginB)
const subject: unknown = { ... }
checker.check(pluginA.create(...), subject)
The plugin needs to supply a type guard function, and the type.
It might not be possible as generic on generic is not possible.
unional commented
It maybe possible if I rely on return type inference all the way.
But in order to do that,
I need to have a very solid set of type manipulation utility similar to ts-toolbelt
.