🔎 Search Terms
- asserts
- assertion function
- type guard
- record
🕗 Version & Regression Information
Worked on 4.9, broken since 5.0
Probably introduced by #52984
⏯ Playground Link
Playground link with relevant code
💻 Code
declarefunctionisObject(o: unknown): o is Record<string,any>declarefunctionassertObject(o: unknown): asserts o is Record<string,any>letvalue: {}=null!;if(isObject(value)){value.anything// error since 5.0.2}assertObject(value)value.anything// error since 5.0.2🙁 Actual behavior
Property 'anything' does not exist on type '{}'.(2339)
🙂 Expected behavior
No error, narrowing / assertion should work fine.
🔎 Search Terms
🕗 Version & Regression Information
Worked on 4.9, broken since 5.0
Probably introduced by #52984
⏯ Playground Link
Playground link with relevant code
💻 Code
🙁 Actual behavior
Property 'anything' does not exist on type '{}'.(2339)🙂 Expected behavior
No error, narrowing / assertion should work fine.