UNPKG

@dasch-swiss/dsp-js

Version:

JavaScript library that handles API requests to Knora

16 lines (15 loc) 406 B
/** * @category Internal */ export declare namespace TypeGuard { type Constructor<T> = { new (...args: any[]): T; }; /** * Checks if the given object is an instance of the indicated class. * * @param o the object to be checked. * @param className the name of the class to check for. */ const typeGuard: <T>(o: any, className: Constructor<T>) => o is T; }