Open pvakevai opened 1 year ago
@raimohanska The issue lies within:
export declare type ObjectTemplate<O> = {
[K in keyof O]: O[K] extends Observable<infer I> ? I : (O[K] extends Record<any, any> ? ObjectTemplate<O[K]> : (O[K] extends Array<infer I2> ? ArrayTemplate<I2> : O[K]));
};
This should include a separate check for Date
. Right now the check O[K] extends Record<any, any>
matches Date objects.
Drop a pull request if you want this fixed. I honestly haven’t touched the library for a long time but I believe a fix release can be made for this.
ObjectTemplate type mappings are wrong, combining a template with a field of type Date will not be typed correctly. See