https://pulumi.com logo
#general
Title
# general
b

better-rainbow-14549

03/25/2020, 3:36 PM
in a dynamic provider i've got a lot of
public readonly serverUri: pulumi.Output<string>;
which is filled out by pulumi after apply but with
strict: true
in tsconfig.json it complains that it's "not definitely assigned in constructor" - is there any easy way around that please
m

microscopic-pilot-97530

03/25/2020, 10:12 PM
There are a couple ways to address this. One way is to add definite assignment assertions to each property. https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-7.html#definite-assignment-assertions Adding an exclamation point after the property names like:
public readonly serverUri!: pulumi.Output<string>;
b

better-rainbow-14549

03/26/2020, 4:17 PM
oh great thanks, didnt know about the ! thing