mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
13 lines
320 B
TypeScript
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
|