Type alias Infer<P>

Infer<P>: P extends BasePredicate<infer T> ? T : never

Retrieve the type from the given predicate.

Example

import ow, {Infer} from 'ow';

const userPredicate = ow.object.exactShape({
name: ow.string
});

type User = Infer<typeof userPredicate>;

Type Parameters

  • P