hi, I have a question about 'isNil' function inside commons/utils/shared.utils.ts
Expected behavior
Its type guard must contain checks for both undefined and null values.
Current status:
The source code contains guards for both,
but the compiled d.ts file contains only the null type guard.
Proof:
https://github.com/nestjs/nest/blob/v10.2.10/packages/common/utils/shared.utils.ts
When I see this code, it contains
export const isNil = (val: any): val is null | undefined =>
isUndefined(val) || val === null;
However, if I see the compiled version of it, it somehow weirdly erases the 'undefined' part of the type guard.
export declare const isNil: (val: any) => val is null;
You can check this out here https://www.npmjs.com/package/@nestjs/common/v/10.2.10?activeTab=code
and go to common/utils/shared.utils.d.ts
Why is this happening?