Home > OS >  Force object type based on an interface
Force object type based on an interface

Time:11-15

I want to force a Zod type based on a TypeScript interface:

import { z } from 'zod';

interface Foo {
  id: string;
  count: number;
}

                  //           
  • Related