Using generic Classes and Functions

suggest change

Create generic class instance:

var stringRunnable = new Runnable<string>();

Run generic function:

function runSafe<T extends Runnable<U>, U>(runnable: T);

// Specify the generic types:
runSafe<Runnable<string>, string>(stringRunnable);

// Let typescript figure the generic types by himself:
runSafe(stringRunnable);

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents