module: rethrow amaro error message

PR-URL: https://github.com/nodejs/node/pull/56568
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
pull/56613/head
Marco Ippolito 2025-01-14 16:35:14 +01:00 committed by Node.js GitHub Bot
parent d1a3f30642
commit e799ebd7ff
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}
}