diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 8763d25364..265de2403c 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -5,6 +5,7 @@ Changelog ~~~~~~~~~~~~~~~~ * Maintenance: Update djhtml (html formatting) library to v 1.5.2 (Loveth Omokaro) +* Maintenance: Re-enable `strictPropertyInitialization` in tsconfig (Thibaud Colas) 4.2 (xx.xx.xxxx) - IN DEVELOPMENT diff --git a/client/src/controllers/ActionController.ts b/client/src/controllers/ActionController.ts index 5a1d20dc67..23648f67b3 100644 --- a/client/src/controllers/ActionController.ts +++ b/client/src/controllers/ActionController.ts @@ -20,8 +20,8 @@ export class ActionController extends Controller { url: String, }; - continueValue: boolean; - urlValue: string; + declare continueValue: boolean; + declare urlValue: string; post(event: Event) { event.preventDefault(); diff --git a/client/src/controllers/UpgradeController.ts b/client/src/controllers/UpgradeController.ts index c698a92c33..93fcd9692f 100644 --- a/client/src/controllers/UpgradeController.ts +++ b/client/src/controllers/UpgradeController.ts @@ -28,12 +28,12 @@ export class UpgradeController extends Controller { url: { default: 'https://releases.wagtail.org/latest.txt', type: String }, }; - currentVersionValue: string; - hiddenClass: string; - latestVersionTarget: HTMLElement; - linkTarget: HTMLElement; - ltsOnlyValue: any; - urlValue: string; + declare currentVersionValue: string; + declare hiddenClass: string; + declare latestVersionTarget: HTMLElement; + declare linkTarget: HTMLElement; + declare ltsOnlyValue: any; + declare urlValue: string; connect() { this.checkVersion(); diff --git a/tsconfig.json b/tsconfig.json index 83215b7a31..902987b89b 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -11,7 +11,7 @@ "noUnusedLocals": true, "noUnusedParameters": true, "strictNullChecks": true, - "strictPropertyInitialization": false, + "strictPropertyInitialization": true, "target": "ES2021" // Since lowest browser support is for Safari 14 }, "files": [