/ src / schema / instance.ts
instance.ts
1  import { SchemaType } from "./type";
2  
3  export const instance = <T>(clazz?: new (...args: any[]) => T): T => {
4    const value = new SchemaType();
5    value.instanceof = clazz;
6    return value as any;
7  };