pulumi/changelog
Will Jones fbe675aeba
Type functions decorated by `@pulumi.getter` (#15865)
This commit strengthens the type of the `@pulumi.getter` decorator so
that tools like Pyright infer the type of the decorated function
correctly. Prior to this, decorated properties could be inferred as
having the type `Any`. This is particularly troublesome when using
methods such as `apply`:

```python
x = random.RandomString("x", ...)

y = x.result.apply(lambda value: f"y-{value}")
```

Here, `x.result` having the type `Any` means that `value` will end up
being `Unknown`, providing no useful type information inside the lambda.
With this commit, `result` will correctly be inferred as having the type
`Output[str]`, and thus `value` will be typed as `str`. Fixes #12557.
2024-04-05 15:14:40 +00:00
..
pending Type functions decorated by `@pulumi.getter` (#15865) 2024-04-05 15:14:40 +00:00
config.yaml Fix coming soon misrender (#15783) 2024-03-26 17:24:37 +00:00