From 14bb940d6aee65547d2a4e87125fb5bfa4e3b1d1 Mon Sep 17 00:00:00 2001 From: Kai Volland Date: Thu, 31 Oct 2024 15:36:16 +0100 Subject: [PATCH] feat: throw error for unsupported targetParsers --- src/index.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/index.ts b/src/index.ts index 53162e9..7419cef 100644 --- a/src/index.ts +++ b/src/index.ts @@ -191,6 +191,13 @@ async function writeFile( let output; indicator.text = `Writing to ${targetFile}`; if (targetParser) { + if (targetParser instanceof LyrxParser) { + throw new Error('LyrxParser is not supported as target parser.'); + } + if (targetParser instanceof MapfileParser) { + throw new Error('MapfileParser is not supported as target parser.'); + } + const { output: writeOutput, errors: writeErrors,