@@ -14,22 +14,22 @@ import {
1414 type Value ,
1515} from '@h5web/shared/hdf5-models' ;
1616
17- import { type AttrName , type AttrValuesStore } from './providers/models' ;
17+ import { type AttrValuesStore } from './providers/models' ;
1818
19- export function hasAttribute ( entity : Entity , attributeName : AttrName ) : boolean {
19+ export function hasAttribute ( entity : Entity , attributeName : string ) : boolean {
2020 return entity . attributes . some ( ( attr ) => attr . name === attributeName ) ;
2121}
2222
2323export function findAttribute (
2424 entity : Entity ,
25- attributeName : AttrName ,
25+ attributeName : string ,
2626) : Attribute | undefined {
2727 return entity . attributes . find ( ( attr ) => attr . name === attributeName ) ;
2828}
2929
3030export function findScalarNumAttr (
3131 entity : Entity ,
32- attributeName : AttrName ,
32+ attributeName : string ,
3333) : Attribute < ScalarShape , NumericType > | undefined {
3434 const attr = findAttribute ( entity , attributeName ) ;
3535 return attr && hasScalarShape ( attr ) && hasNumericType ( attr )
@@ -39,7 +39,7 @@ export function findScalarNumAttr(
3939
4040export function findScalarStrAttr (
4141 entity : Entity ,
42- attributeName : AttrName ,
42+ attributeName : string ,
4343) : Attribute < ScalarShape , StringType > | undefined {
4444 const attr = findAttribute ( entity , attributeName ) ;
4545 return attr && hasScalarShape ( attr ) && hasStringType ( attr ) ? attr : undefined ;
0 commit comments