Skip to content

Commit

Permalink
Add strict to tsconfig.json
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Jul 24, 2021
1 parent 1cd6ae1 commit 80ed2f1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
12 changes: 12 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
})
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"declaration": true,
"emitDeclarationOnly": true,
"allowSyntheticDefaultImports": true,
"skipLibCheck": true
"skipLibCheck": true,
"strict": true
}
}

0 comments on commit 80ed2f1

Please sign in to comment.