Anybody know how I can fix this? This is coming fr...
# typescript
c
r
What if you disable strictPropertyInitialization in your tsconfig?
c
That seems to have fixed it, including the issue in the main script. Hmm, not really a TS guru (by far), but this always feels really workaround-y. Thanks though.
r
It actually is workaraund. Instead of disabling that compiler rule it should be fixed (really fill that property when initializing). If you are 100% sure that it will always exists (let say the value is initialized in function called from constructor) you can tell compiler to shut up with ! : webContainer!: Promise
t
You only get it for one property out of three?
c
all three
t
Right. We don’t have
"strictPropertyInitialization": true,
in our examples, so the error is not visible by default. The properties are initialized inside the
super
call, so you either need to switch the check off or add
!
👍 1