UNPKG

@xylabs/typeof

Version:

Base functionality used throughout XY Labs TypeScript/JavaScript libraries

8 lines 379 B
/** * Invokes the callback only if the value is neither null nor undefined. * @param value - The value to check. * @param func - The callback to invoke with the value if it is defined. * @returns The value if defined, or undefined otherwise. */ export declare const ifDefined: <T>(value: T, func: (value: T) => void) => T | undefined; //# sourceMappingURL=ifDefined.d.ts.map