/ src / schema / enum.ts
enum.ts
 1  import { SchemaType } from "./type";
 2  
 3  const enumeration = <T>(Enum: T): {
 4    [K in keyof T]: T[K] extends (...args: any[]) => any ? never : T[K]
 5  }[keyof T] => {
 6    const value = new SchemaType();
 7    value.enum = Enum;
 8    return value as any;
 9  };
10  
11  export { enumeration as enum };