type IncludesString = T extends `${infer _Start}${U}${infer _End}` ? true : false; type NonEmptyArray = [T, ...T[]]; type HapnsErrorConstructor = IncludesString extends true ? new (...args: NonEmptyArray) => Error : new () => Error; export declare function defineError(name: string, message: Message): HapnsErrorConstructor; export {};