From 0f6a17527b71375948b786c47468c0165cb3c9dd Mon Sep 17 00:00:00 2001 From: 0xmuralik Date: Tue, 4 Apr 2023 10:43:32 +0530 Subject: [PATCH] return error for unkown record type --- src/types.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/types.ts b/src/types.ts index dbe5b15..80009ef 100644 --- a/src/types.ts +++ b/src/types.ts @@ -172,7 +172,11 @@ export class Record { }; break; - default: + default: { + const err = new Error("Unsupported reocrd type"); + console.error(err); + throw err; + }; } return a }