0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-11-21 18:09:02 +01:00

Re-enable strictPropertyInitialization in tsconfig

- Use declare for existing Stimulus controllers
- First enabled in #9761 & then disabled in #9818
This commit is contained in:
Thibaud Colas 2023-01-25 12:50:59 +00:00 committed by LB (Ben Johnston)
parent 5db3cda90b
commit d4544ec9ee
4 changed files with 10 additions and 9 deletions

View File

@ -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

View File

@ -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();

View File

@ -28,12 +28,12 @@ export class UpgradeController extends Controller<HTMLElement> {
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();

View File

@ -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": [