pickDictionaryItemsconstant
pickDictionaryItems: <T>(dict: ImmutableDictionary<T>, ...keys: string[]) => ImmutableDictionary<T>
| Return | |
|---|---|
unknown | A new dictionary containing only the picked items. |
Pick several items from a dictionary object and return a new object with only those items.
Examples
pickDictionaryItems({ a: 1, b: 2, c: 3 }, "a", "b"); // { a: 1, b: 2 }