From a819e74b3c6ec2b9fbe84d476d5150907ce61165 Mon Sep 17 00:00:00 2001 From: GeorgianStan Date: Fri, 9 Jun 2023 21:44:21 +0300 Subject: [PATCH] chore: tsconfig with strictNullChecks and strictPropertyInitialization --- src/index.ts | 2 +- tsconfig.json | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 2e4df84..1cd2c9b 100644 --- a/src/index.ts +++ b/src/index.ts @@ -13,7 +13,7 @@ class Menu { #showMenu() { const options = this.#optionsContent.map((fragment) => { const option = document.createElement('span'); - option.setAttribute(TOKENS.get('optionAttr'), ''); + option.setAttribute(TOKENS.get('optionAttr') as string, ''); option.append(fragment); return option; }); diff --git a/tsconfig.json b/tsconfig.json index b5b382e..1598acc 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -6,6 +6,8 @@ "declaration": true, "declarationMap": true, "allowSyntheticDefaultImports":true, + "strictNullChecks":true, + "strictPropertyInitialization":true, "outDir": "./dist" }, "include": ["src/**/*"]