You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the types for ManifestNormalized and other resources do not match the IIIF specification, instead assume almost completely optional resource (for cases where a manifest, collection or annotation page has not been loaded yet). However there are times where you may know that a resource has been loaded.
Adding variations for these loaded resources: LoadedManifestNormalized with the specification constraints would allow for more accurate types. This could be a return value from vault.loadManifest() for example, and could also be used manually to narrow types.
functionisLoaded(manifest: ManifestNormalized): manifest is LoadedManifestNormalized{returnmanifest.items.length>0;}manifest={ ... };// ManifestNormalized;if(isLoaded(manifest)){// manifest Narrowed to LoadedManifestNormalized.manifest.label;// no errorsmanifest.items[0].type;// no errors. }
The text was updated successfully, but these errors were encountered:
Currently the types for
ManifestNormalized
and other resources do not match the IIIF specification, instead assume almost completely optional resource (for cases where a manifest, collection or annotation page has not been loaded yet). However there are times where you may know that a resource has been loaded.Adding variations for these loaded resources:
LoadedManifestNormalized
with the specification constraints would allow for more accurate types. This could be a return value fromvault.loadManifest()
for example, and could also be used manually to narrow types.The text was updated successfully, but these errors were encountered: