mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-02-27 03:02:50 +00:00
12 lines
277 B
TypeScript
12 lines
277 B
TypeScript
import map = require("just-map-values");
|
|
|
|
const obj = {foo: {bar: []}};
|
|
|
|
map(obj, (value) => value); // $ExpectType {}
|
|
map(obj, (value, key, object) => ''); // $ExpectType {}
|
|
|
|
// Incorrect argument
|
|
map(); // $ExpectError
|
|
map(obj); // $ExpectError
|
|
map(obj, ''); // $ExpectError
|