Files
TypeScript/tests/cases/compiler
Nathan Shively-Sanders f248567dab Filter undefined only in binding patterns in params (#38116)
initialiser. But this is only correct when the initialiser is for a
parameter. For example:

```ts
declare let x: { s: string } | undefined;
const { s } = x;
```

This PR removes undefined from the type of a binding pattern only when
the binding pattern's parent is a parameter. This fixes the regression
from 3.8. However, it's still not the ideal fix; we should be able to
use control flow to solve this problem. Consider:

```ts
const { s }: { s: string } | undefined = { s: 'hi' }
declare function f({ s }: { s: string } | undefined = { s: 'hi' }): void
```

Neither line should have an error, but the first does in 3.8 and after
this change.
2020-04-22 09:56:32 -07:00
..
2019-06-28 17:09:22 -10:00
2019-09-20 17:17:39 -07:00
2019-05-30 17:35:10 -07:00
2019-06-27 16:48:00 -10:00
2019-12-09 16:31:23 -08:00
2019-05-23 17:09:17 -07:00
2019-10-13 09:45:56 -07:00