type WhenValue = (() => T) | T; declare function when(condition: any, value: null | undefined): Record & Array; declare function when>(condition: any, value: WhenValue): T | []; declare function when>(condition: any, value: WhenValue): T | Record; export { when };