From e5432c9229055342f6ff6f6506b0dccbfd9523ba Mon Sep 17 00:00:00 2001 From: Sid Chatterjee Date: Thu, 12 Sep 2024 18:38:55 +0100 Subject: [PATCH] Ensure NonRetryableError is exported in cloudflare:workflows --- types/defines/workflows.d.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/types/defines/workflows.d.ts b/types/defines/workflows.d.ts index d54a2d22b58..6858b5e0fab 100644 --- a/types/defines/workflows.d.ts +++ b/types/defines/workflows.d.ts @@ -2,12 +2,14 @@ * NonRetryableError allows for a user to throw a fatal error * that makes a Workflow instance fail immediately without triggering a retry */ -declare abstract class NonRetryableError extends Error { - /** - * `__brand` is used to differentiate between `NonRetryableError` and `Error` - * and is omitted from the constructor because users should not set it - */ - public constructor(message: string, name?: string); +declare module "cloudflare:workflows" { + export abstract class NonRetryableError extends Error { + /** + * `__brand` is used to differentiate between `NonRetryableError` and `Error` + * and is omitted from the constructor because users should not set it + */ + public constructor(message: string, name?: string); + } } declare abstract class Workflow {