Skip to content

Commit cd75d72

Browse files
authored
Merge pull request #1952 from silx-kit/shape-type
Use discriminated union to type `Shape` of datasets and attributes
2 parents 711ccd1 + 813d376 commit cd75d72

39 files changed

+915
-372
lines changed

packages/app/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ export { default as DataProvider } from './providers/DataProvider';
176176
export { DataProviderApi } from './providers/api';
177177
export { getValueOrError } from './providers/utils';
178178
export { useValuesInCache } from './hooks';
179+
export { parseShape } from '@h5web/shared/hdf5-utils';
179180

180181
export { default as ValueFetcher } from './vis-packs/core/ValueFetcher';
181182
export { applyMapping, getBaseArray, toNumArray } from './vis-packs/core/utils';

packages/app/src/metadata-viewer/EntityInfo.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ function EntityInfo(props: Props) {
3737
<tr>
3838
<th scope="row">Shape</th>
3939
<td>
40-
{isNonNullShape(entity.shape) ? renderDims(entity.shape) : 'None'}
40+
{isNonNullShape(entity.shape)
41+
? renderDims(entity.shape.dims)
42+
: 'None'}
4143
</td>
4244
</tr>
4345
)}

0 commit comments

Comments
 (0)