Files
flipper/desktop/flipper-plugin/src/data-source/index.tsx
Anton Kastritskiy 4a4cc21d89 Refine DataSource id to use actual key type instead of a wide string type
Summary: Current implementation uses type `string` as a key for indexing items stored in datasource. However, users can provide any key as an index which means that the type of index item can be anything, not only string. This diff introduces a more refined types for the key. It adds another requirement to provide a key property to a generic which is used to infer the index type.

Reviewed By: mweststrate, aigoncharov

Differential Revision: D31895751

fbshipit-source-id: 19ba907bd6f35df87e3fa442db5fc5cec6af174d
2021-10-28 10:44:01 -07:00

22 lines
502 B
TypeScript

/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
*/
export {
DataSource,
createDataSource,
DataSourceOptions,
DataSourceOptionKey,
} from './DataSource';
export {
DataSourceRendererVirtual,
DataSourceVirtualizer,
useTableRedraw,
} from './DataSourceRendererVirtual';
export {DataSourceRendererStatic} from './DataSourceRendererStatic';