Skip to content

Common callbacks

Adrien Castex edited this page Jun 1, 2017 · 1 revision

There are 3 common callbacks in the project :

Name Type description Description
SimpleCallback (error : Error) => void Can give an error
ReturnCallback<T> (error : Error, data : T) => void Can give an error or a data of type T
Return2Callback<T, Q> (error : Error, x : T, y : Q) => void Can give an error or a tuple of x and y of type T and Q

TypeScript

export type SimpleCallback = (error : Error) => void
export type ReturnCallback<T> = (error : Error, data : T) => void
export type Return2Callback<T, Q> = (error : Error, x : T, y : Q) => void
Clone this wiki locally