From e799ebd7ff8e691958dfbdb8baf2b81236f87669 Mon Sep 17 00:00:00 2001 From: Marco Ippolito Date: Tue, 14 Jan 2025 16:35:14 +0100 Subject: [PATCH] module: rethrow amaro error message PR-URL: https://github.com/nodejs/node/pull/56568 Reviewed-By: Rafael Gonzaga Reviewed-By: Marco Ippolito Reviewed-By: Jacob Smith Reviewed-By: Pietro Marchini Reviewed-By: Paolo Insogna --- lib/internal/modules/typescript.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/internal/modules/typescript.js b/lib/internal/modules/typescript.js index 5a240a6a540..993fd3ff72d 100644 --- a/lib/internal/modules/typescript.js +++ b/lib/internal/modules/typescript.js @@ -49,7 +49,7 @@ function parseTypeScript(source, options) { try { return parse(source, options); } catch (error) { - throw new ERR_INVALID_TYPESCRIPT_SYNTAX(error); + throw new ERR_INVALID_TYPESCRIPT_SYNTAX(error.message); } }