UNPKG

isaacscript-common

Version:

Helper functions and features for IsaacScript mods.

9 lines (8 loc) 312 B
/** Helper type to check if an object or class has one or more functions/methods. */ export type HasFunction<T> = Record<string, unknown> extends { // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type [K in keyof T as T[K] extends Function ? K : never]-?: 1; } ? never : T;