Farfetched and superstruct 
Integration is distributed as a separate package, you have to install it and its peer dependencies before usage
sh
pnpm install superstruct @farfetched/superstructsh
yarn add superstruct @farfetched/superstructsh
npm install superstruct @farfetched/superstructsuperstructContract 
Creates a Contract based on given Struct.
ts
import * as s from 'superstruct';
import { superstructContract } from '@farfetched/superstruct';
const Asteroid = s.type({
  type: s.literal('asteroid'),
  mass: s.number(),
});
const asteroidContract = superstructContract(Asteroid);
/* typeof asteroidContract === Contract<
 *   unknown, 👈 it accepts something unknown
 *   { type: 'asteriod', mass: number }, 👈 and validates if it is an asteroid
 * >
 */