best-xylophone-83824
08/19/2019, 9:23 AMimport * as gcp from "@pulumi/gcp";
const x = {} as gcp.container.NodePoolArgs["nodeConfig"]["labels"];
Then
$ node_modules/.bin/tsc --noEmit --noErrorTruncation test.ts
test.ts:2:58 - error TS2339: Property 'labels' does not exist on type 'Input<{ diskSizeGb?: .....; labels?: Input<{ [key: string]: Input<string>; }>;'
how come? labels
is clearly there 🙂pulumi.Unwrap
, but IMHO it should be needed:
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const x = {} as pulumi.Unwrap<gcp.container.NodePoolArgs>["nodeConfig"]["labels"];
$ node_modules/.bin/tsc --noEmit nodepool.ts
# no errror
Compiling whole project:
$ node_modules/.bin/tsc --noEmit
nodepools.ts:37:111 - error TS2339: Property 'labels' does not exist on type 'UnwrappedObject<{ diskSizeGb?: ...