const a = < T extends any = any, B extends boolean = true, R extends T | undefined = B extends true ? T : T | undefined &