laravel-echo
Version:
Laravel Echo library for beautiful Pusher and Socket.IO integration
15 lines (12 loc) • 365 B
text/typescript
function isConstructor(obj: unknown): obj is new (...args: any[]) => any {
try {
new (obj as new (...args: any[]) => any)();
} catch (err) {
if (err instanceof Error && err.message.includes('is not a constructor')) {
return false;
}
}
return true;
}
export { isConstructor };
export * from './event-formatter';