`Listable` Type
#172
-
Hello! I'm trying to write a little export async function has(root: zarr.Group<FetchStore>, path: string) {
try {
await zarr.open(root.resolve(path));
} catch (error) {
if (error instanceof zarr.NodeNotFoundError) {
return false;
}
return true;
}
} but the |
Beta Was this translation helpful? Give feedback.
Answered by
manzt
May 10, 2024
Replies: 1 comment 2 replies
-
I can work on exporting hat, but in the meantime you can use the type MaybeListable = Awaited<ReturnType<typeof tryWithConsolidated>>; |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
ilan-gold
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I can work on exporting hat, but in the meantime you can use the
ReturnType
helper from TS to create a type alias: