Skip to content

Instantly share code, notes, and snippets.

View HatemSat's full-sized avatar

Hatem Satouri HatemSat

View GitHub Profile
@HatemSat
HatemSat / ts-types.ts
Last active March 16, 2022 13:24
ts-types
// Deeply anyfy nested Date and string properties :
type Any<T> = {
[Key in keyof T]: T[Key] extends { [K: string]: any } ? (T[Key] extends Date | string ? any : Any<T[Key]>) : any;
};