https://pulumi.com logo
Title
c

colossal-room-15708

02/11/2020, 9:59 AM
r

rough-tomato-98795

02/11/2020, 10:06 AM
What if you disable strictPropertyInitialization in your tsconfig?
c

colossal-room-15708

02/11/2020, 10:08 AM
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

rough-tomato-98795

02/11/2020, 10:14 AM
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

tall-librarian-49374

02/11/2020, 10:20 AM
You only get it for one property out of three?
c

colossal-room-15708

02/11/2020, 10:22 AM
all three
t

tall-librarian-49374

02/11/2020, 10:31 AM
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