jdinhify / vscode-theme-gruvbox

Gruvbox theme for vscode based on https://github.com/morhetz/gruvbox
https://marketplace.visualstudio.com/items?itemName=jdinhlife.gruvbox
MIT License
267 stars 63 forks source link

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

Closed ap32 closed 1 year ago

ap32 commented 1 year ago

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

ap32 commented 1 year ago

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.