Files
DefinitelyTyped/types/group-array/group-array-tests.ts
T
2020-01-23 10:45:53 -08:00

13 lines
320 B
TypeScript

import groupArray = require("group-array");
const input = [
{ tag: 'one', content: 'A' },
{ tag: 'one', content: 'B' },
{ tag: 'two', content: 'C' },
{ tag: 'two', content: 'D' },
{ tag: 'three', content: 'E' },
{ tag: 'three', content: 'F' }
];
groupArray(input, 'tag'); // $ExpectType object