import { OcsSharePermissions } from './types'; export interface ErrorInfo { expectedErrorCodes?: number[]; customErrors?: { [key: number]: string; }; identifier?: string | number; message: string; useMeta: boolean; } type OmitLastParameter any> = Parameters extends [...infer PARAMS, any] ? PARAMS : Parameters; type LastParameter any> = Parameters extends [...any[], infer LAST] ? LAST : never; type ExtractDataTypeFromCallback = TArgument extends (err: any, data: infer TData) => any ? TData : never; export declare function rejectWithOcsError(error: any, errorInfo: ErrorInfo): Promise; export declare function assignDefined(target: any, ...sources: any[]): void; export declare function ocsSharePermissionsToText(permissions: OcsSharePermissions): string; /** * Promisify a function that takes a callback as its last parameter * @param fn The function to promisify * @returns A function that returns a promise * * @note This is a simple replacement for the `promisify` function from the `util` package which is not available in the browser (unless you polyfill it) */ export declare function promisify any, CallbackData = ExtractDataTypeFromCallback>>(fn: TFn): (...args: OmitLastParameter) => Promise; export {}; //# sourceMappingURL=helper.d.ts.map