mirror of
https://github.com/Start9Labs/start-sdk.git
synced 2026-04-02 05:23:21 +00:00
chore: Add in some more types and tools
This commit is contained in:
6
util.ts
6
util.ts
@@ -15,3 +15,9 @@ export const exists = (
|
||||
effects: T.Effects,
|
||||
props: { path: string; volumeId: string },
|
||||
) => effects.metadata(props).then((_) => true, (_) => false);
|
||||
|
||||
export const errorCode = (code: number, error: string) => ({
|
||||
"error-code": [code, error] as const,
|
||||
});
|
||||
export const error = (error: string) => ({ error });
|
||||
export const ok = { result: null };
|
||||
|
||||
Reference in New Issue
Block a user