mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* feat: Add `array.from` * docs(array.from): Add TSDoc comments * docs(array.from): Improve TSDoc
13 lines
429 B
TypeScript
13 lines
429 B
TypeScript
import ArrayFrom = require('array.from');
|
|
|
|
/**
|
|
* The `expectType` function from https://www.npmjs.com/package/tsd,
|
|
* except instead of returning `void`, it returns `T`.
|
|
*/
|
|
declare function expectType<T>(t: T): T;
|
|
|
|
expectType<typeof Array.from>(ArrayFrom);
|
|
expectType<typeof Array.from>(ArrayFrom.implementation);
|
|
expectType<() => typeof Array.from>(ArrayFrom.getPolyfill);
|
|
expectType<() => typeof Array.from>(ArrayFrom.shim);
|