Skip to content

Commit

Permalink
Export models, type guards and assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
axelboc committed Feb 17, 2025
1 parent 8bdea9f commit e7bb720
Show file tree
Hide file tree
Showing 2 changed files with 215 additions and 61 deletions.
116 changes: 112 additions & 4 deletions packages/app/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,120 @@ export type GetExportURL = NonNullable<DataProviderApi['getExportURL']>;
export { useDataContext } from './providers/DataProvider';
export type { DataContextValue } from './providers/DataProvider';

// Undocumented
export { assertEnvVar } from '@h5web/shared/guards';
export { assertNonNull } from '@h5web/shared/guards';

// Undocumented (for @h5web/h5wasm)
export { default as DataProvider } from './providers/DataProvider';
export { DataProviderApi } from './providers/api';
export type { ValuesStoreParams } from './providers/models';
export { getValueOrError } from './providers/utils';

// Undocumented models
export { EntityKind } from '@h5web/shared/hdf5-models';

export type {
// Entity
Entity,
ProvidedEntity,
ChildEntity,
Group,
GroupWithChildren,
Dataset,
Datatype,
UnresolvedEntity,
LinkClass,
Attribute,
Filter,
VirtualSource,

// Shape
Shape,
ScalarShape,
ArrayShape,

// Type
DType,
StringType,
IntegerType,
FloatType,
NumericType,
BooleanType,
EnumType,
NumericLikeType,
ComplexType,
PrintableType,
CompoundType,
ArrayType,
VLenType,
TimeType,
BitfieldType,
OpaqueType,
ReferenceType,
UnknownType,

// Value
ScalarValue,
ArrayValue,
AttributeValues,
H5WebComplex,
} from '@h5web/shared/hdf5-models';

// Undocumented guards and assertions
export {
isDefined,
isNonNull,
assertDefined,
assertNonNull,
assertNum,
assertStr,
assertEnvVar,
assertComplex,
isTypedArray,
isBigIntTypedArray,
assertArray,
assertArrayOrTypedArray,
isGroup,
hasChildren,
isDataset,
isDatatype,
assertGroup,
assertGroupWithChildren,
assertDataset,
assertDatatype,
isScalarShape,
isArrayShape,
hasScalarShape,
hasArrayShape,
hasNonNullShape,
assertScalarShape,
assertArrayShape,
assertNonNullShape,
hasMinDims,
hasNumDims,
assertMinDims,
assertNumDims,
isStringType,
isIntegerType,
isFloatType,
isNumericType,
isBoolType,
isEnumType,
isNumericLikeType,
isComplexType,
isPrintableType,
isCompoundType,
hasStringType,
hasNumericType,
hasBoolType,
hasEnumType,
hasNumericLikeType,
hasComplexType,
hasPrintableType,
hasCompoundType,
assertStringType,
assertNumericType,
assertNumericLikeType,
assertComplexType,
assertPrintableType,
assertCompoundType,
assertScalarValue,
assertDatasetValue,
} from '@h5web/shared/guards';
Loading

0 comments on commit e7bb720

Please sign in to comment.