UNPKG

fluxject

Version:

A strongly-typed dependency injection library.

11 lines (10 loc) 334 B
/** * Check if the given function, `fn`, is a constructor. * * This will not invoke the constructor * @param {any} fn * Function to check. * @returns {fn is (new (...args: any[]) => any)} * True if the function is a constructor, otherwise false. */ export function isConstructor(fn: any): fn is (new (...args: any[]) => any);