From 80ed2f186bd99ac280f6964f220a05a733012a1d Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Sat, 24 Jul 2021 16:19:25 +0200 Subject: [PATCH] Add `strict` to `tsconfig.json` --- index.js | 12 ++++++++++++ tsconfig.json | 3 ++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index bd0987b..d775dca 100644 --- a/index.js +++ b/index.js @@ -39,22 +39,34 @@ export function parent(node, parent) { export {literal, _void, wrap} +// @ts-expect-error: fine. const all = mapz(assert, {key: 'children'}) const nlcst = zwitch('type', { // Core interface. + // @ts-expect-error: fine. unknown, + // @ts-expect-error: fine. invalid: unknown, // Per-type handling. handlers: { + // @ts-expect-error: fine. RootNode: wrap(RootNode), + // @ts-expect-error: fine. ParagraphNode: parent, + // @ts-expect-error: fine. SentenceNode: parent, + // @ts-expect-error: fine. WordNode: parent, + // @ts-expect-error: fine. TextNode: literal, + // @ts-expect-error: fine. SymbolNode: literal, + // @ts-expect-error: fine. PunctuationNode: literal, + // @ts-expect-error: fine. WhiteSpaceNode: literal, + // @ts-expect-error: fine. SourceNode: literal } }) diff --git a/tsconfig.json b/tsconfig.json index 1cb61bf..ab9f0b7 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -10,6 +10,7 @@ "declaration": true, "emitDeclarationOnly": true, "allowSyntheticDefaultImports": true, - "skipLibCheck": true + "skipLibCheck": true, + "strict": true } }