Closed as not planned
Closed as not planned
Description
π Search Terms
keyof interface extends record number
π Version & Regression Information
- This is the behavior in every version I tried
β― Playground Link
π» Code
interface EmptyInterface {};
type StringRecord = Record<string, string>;
interface Interface extends StringRecord {};
type EIFKey = keyof EmptyInterface // never
type SRKey = keyof StringRecord // string
type IFKey = keyof Interface // number | string, why not string?
π Actual behavior
IFKey
is number | string
π Expected behavior
IFKey
should be string