mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-30 01:04:49 -05:00
Filter undefined from binding elements with initialisers without undefined in the type (#38122)
* Filter undefined from binding elts w/o undefined-containing inits * use getTypeOfInitializer instead * improve comment based on Wesleys suggestion
This commit is contained in:
committed by
GitHub
parent
ef83109dbf
commit
032aa90289
@@ -6,3 +6,4 @@ const fAnnotated: typeof fInferred = ({ a = 0 } = {}) => a;
|
||||
|
||||
declare var t: { s: string } | undefined;
|
||||
const { s } = t;
|
||||
function fst({ s } = t) { }
|
||||
|
||||
Reference in New Issue
Block a user