mirror of https://github.com/pulumi/pulumi.git
4756d45258
This change fixes the TypeScript checking of output "any" maps. Previously, as in the referenced issue, an `Output<Record<string, any>>` had unusable properties with the lifting mechanisms in TypeScript. That is, for such an output `foo`, using `foo["bar"]` would typically result in a type error, as the type would be: ```typescript pulumi.OutputInstance<unknown> | pulumi.Output<any> ``` This union type with unknown results in a type error on trying to use `foo["bar"].apply(...)`. This is caused by the conditional type of `Lifted<T>` having a condition `T[P] extends OutputInstance<infer T1>` evaluating to the true branch, with `T1` inferred as `unknown`. This is because `any extends OutputInstance<unknown>`. Adding a strict check for `any` in the conditional type `Lifted<T>` fixes the issue. Fixes #16958 |
||
---|---|---|
.. | ||
automation | ||
runtime | ||
sxs_ts_test | ||
config.spec.ts | ||
constants.ts | ||
init.spec.ts | ||
iterable.spec.ts | ||
options.spec.ts | ||
output.spec.ts | ||
provider.spec.ts | ||
resource.spec.ts | ||
stackReference.spec.ts | ||
unwrap.spec.ts | ||
util.ts |