jdinhify / vscode-theme-gruvbox

Gruvbox theme for vscode based on https://github.com/morhetz/gruvbox

Home Page:https://marketplace.visualstudio.com/items?itemName=jdinhlife.gruvbox

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Typescript bad highlighting with `typeof x extends...`

ap32 opened this issue · comments

Screenshot

function example<
  T extends { bar: 2 }
>(
  v: T
): typeof v & { baz: 3 } {
  type V = typeof v;

  type U0 = V extends { foo: 1 } ? true : false; // works ok
  type U1 = (typeof v) extends { foo: 1 } ? true : false; // works ok
  type U2 = typeof v extends { foo: 1 } ? true : false; // bad highlighting

  return Object.assign({ baz: 3 }, v) as V & { baz: 3 }
}

const v = example({ foo: 1, bar: 2 } as const);

It can be slightly worse, i got this:
Screenshot_20220723_210627

Right now I believe the problem is not with the theme, but with the incorrectly provided scope. Please close the issue if so. Might be worth creating an issue in the vscode repository.