You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Search Terms: object literal parameter inference destructuring default value
Code
constfn1=(options: {headers?: {}})=>{};// No error as expectedfn1({headers: {foo: 1}});constfn2=({ headers ={}})=>{};// Unexpected error: Property 'foo' does not exist on type '{}'.fn2({headers: {foo: 1}});