pulumi/sdk/nodejs/tests
Aaron Friel 4756d45258
Fix TypeScript checking of Output maps of "any" values (#16959)
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
2024-08-15 19:09:21 +00:00
..
automation [autmation/nodejs] Implement Stack.import() to specify and import resources into a stack (#16615) 2024-07-24 14:58:12 +00:00
runtime Add NodeJS test for parameterized providers #2 (#16901) 2024-08-09 08:34:29 +00:00
sxs_ts_test Replace Rome with Biome in the NodeJS SDK (#16456) 2024-06-24 11:14:56 +00:00
config.spec.ts Apply autoformat 2023-04-28 18:27:10 -04:00
constants.ts ci: improve x-plat testing on Windows 2022-03-06 14:45:26 -08:00
init.spec.ts Apply autoformat 2023-04-28 18:27:10 -04:00
iterable.spec.ts Apply autoformat 2023-04-28 18:27:10 -04:00
options.spec.ts Apply autoformat 2023-04-28 18:27:10 -04:00
output.spec.ts allow unknowns in apply during update (#15898) 2024-04-10 16:48:38 +00:00
provider.spec.ts Add google-protobuf types (#14422) 2023-10-27 09:55:44 +00:00
resource.spec.ts [sdk/nodejs] Fix provider for resource methods (#13796) 2023-08-30 14:49:53 +00:00
stackReference.spec.ts Fix TypeScript checking of Output maps of "any" values (#16959) 2024-08-15 19:09:21 +00:00
unwrap.spec.ts Apply autoformat 2023-04-28 18:27:10 -04:00
util.ts Apply autoformat 2023-04-28 18:27:10 -04:00