UNPKG

@punchcard/data-lake

Version:
17 lines 655 B
import { TimestampShape, TypeShape, Value } from '@punchcard/shape'; declare type IsTimestamp<T extends TypeShape, TS extends keyof T['Members']> = T['Members'][TS] extends TimestampShape ? TS : never; export declare class Schema<T extends TypeShape, TS extends keyof T['Members'], ID extends keyof T['Members']> { readonly schemaName: string; readonly shape: T; readonly timestampField: TS; readonly id: ID; constructor(props: { schemaName: string; shape: T; timestampField: IsTimestamp<T, TS>; id: ID; }); timestamp(record: Value.Of<T>): Date; } export {}; //# sourceMappingURL=schema.d.ts.map