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
My compilation target is esnext and my lib is es2017.
Missing / Incorrect Definition
Object.values returns exact property types instead of unknowns. This leads to errors in runtime.
Sample Code
typeFoo={x: string,y: string}typeBar={x: string,y: string;z: number}// 'x' is considered a 'string' hereconstprocessFoo=(foo: Foo)=>Object.values(foo).map(x=>x.endsWith('1'))constbar: Bar={x: '123',y: 'abc',z: 10}// throws "TypeError: x.endsWith is not a function. (In 'x.endsWith('1')', 'x.endsWith' is undefined)"processFoo(bar)
lib Update Request
Configuration Check
My compilation target is
esnext
and my lib ises2017
.Missing / Incorrect Definition
Object.values
returns exact property types instead ofunknown
s. This leads to errors in runtime.Sample Code
playground link
Documentation Link
not related
The text was updated successfully, but these errors were encountered: