service-model
Version:
An object oriented web service framework inspired by Windows Communication Foundation.
19 lines (18 loc) • 459 B
TypeScript
/**
* Returns a new callback that will raise an error if called more than once.
* @param callback The original callback
* @hidden
*/
export declare function onlyOnce<T>(callback: Callback): Callback;
/**
* Interface for callback that does not have a result.
*/
export interface Callback {
(err?: Error): void;
}
/**
* Generic interface for callback that has a result.
*/
export interface ResultCallback<T> {
(err?: Error, result?: T): void;
}