TypeScript icon indicating copy to clipboard operation
TypeScript copied to clipboard

Suggestion: Generic Callback interface

Open frodegil opened this issue 11 years ago • 1 comments

It would be nice to have a generic callback interface as a core type in Typescript. Its very common to have a callback with just one result-parameter.

interface ICallback<T> {
    (result: T) : void;
}

frodegil avatar Apr 22 '15 08:04 frodegil

Given the small number of characters saved, it's not worth dealing with all the name conflicts this could cause.

RyanCavanaugh avatar Apr 22 '15 16:04 RyanCavanaugh