DefinitelyTyped/types/array.from/array.from-tests.ts
ExE Boss 192a1b5b5b feat: Add array.from (#39055)
* feat: Add `array.from`

* docs(array.from): Add TSDoc comments

* docs(array.from): Improve TSDoc
2019-10-16 14:06:06 -07:00

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);