rimeto/ts-optchain

Fix typing of generics

Opened this issue · 0 comments

Repro:

const fn = <K extends { prop: string }>(v: K) =>  {
  const t = oc(v).prop();
}

t is typed as any (vs of string | undefined)