Skip to content

Instantly share code, notes, and snippets.

@sandersn
Last active September 30, 2020 16:26
Show Gist options
  • Save sandersn/61b1e85947ae82856efec9c8d7ba3027 to your computer and use it in GitHub Desktop.
Save sandersn/61b1e85947ae82856efec9c8d7ba3027 to your computer and use it in GitHub Desktop.
Summary of OSD bugs
  • If you want to contribute to a large open source project, many of the error message bugs are simple enough to let you focus on that.
  • If you want to learn to write concise, correct Typescript types, look at the standard library/DOM bugs. The DOM bugs, especially, are in a smaller repo with less building overhead.
  • If you want to learn about compilers, the parser bugs are a good place to start, mostly because it's easier to figure out what the parser should be doing.
  • If you want something interactive, take a look at the codefix bugs. They tend to be complicated to test, but it's super cool when you see your changes running in an editor. (The intellisense, formatter and smart select bugs are similar.)

Improve/fix error messages

These bugs range from fixing message grammar, splitting one error into several, up to restructuring code to be able to give more detailed errors.

  • Bad error message when forgetting a comma in an array of template strings, #40763
  • Better errors when using properties/methods from newer versions of ECMAScript, #40320
  • Error message for assigning to an imported variable is confusing, #39751
  • Error about 'declare' modifier not allowed on class elements is not exactly correct since it can be used on class properties, #39745
  • Bad error message when trying to access protected property of super class type, #35989
  • Avoid listing missing properties on types with only call/construct signatures, #35735
  • Generalize missing token hints to more constructs, #35597
  • Uncalled function checks only works with single conditional, #35584
  • Confusing error message for labels used before definition, #30408
  • Error message related to JSDoc for non-JSDoc syntax error, #29648
  • TS2367: This condition will always return 'false' since the types 'Constructor' and 'typeof Child' have no overlap., #27910
  • Cannot Load Custom Definition File in Repository, #23185
  • Report an error like TS2713 for enum members and provide a corresponding code fix, #20358

Codefixes/refactors

For these bugs, fix refactors or codefixes. These are fairly isolated from the main compiler code and are fun to see working.

  • Enable "Convert to template string" on expressions that don't start with a string, #40671
  • ConvertToTypeOnlyExport codefix breaks when applying all codefixes to an export with 3 re-exported types, #40488
  • "Import" suggestions should be before "Change spelling" suggestions, #38743

Intellisense: completions, quick info and signature help

Completions

  • Property completions with quoted names, #40568

Quick Info

  • Show constructor jsdoc when constructing a class #40159
  • Show type info of yield, #32283
  • Sort jsdoc parameter suggestions by argument position, #20183

Go To/Find References

  • go-to-type-definition, and find-all-refs not working for import.meta, #24353
  • getDefinitionAtPosition doesn't distinguish different kinds in a merged declaration, #22467

Other compiler fixes

Parser

  • Empty JSDocTemplateTag has single type parameter with zero width, #36692
  • JSDocTag width is inconsistent, #35455
  • Parsing issue for call expression with type arguments following left-shift, #37760
  • @description JSDoc tag interferes with callback parameter documentation, #37346

Checker

  • Support either type asserting self in classes, or properly ignoring workaround, #39864
  • Cannot assign to ... because it is a read-only property when using type guard in ctor, #37823

Project System

  • Assert while trying to report error about a bad tsconfig file, #37850

Formatter

  • End tags ignore indentation rules in Javascript React, #39777

Smart Select

  • Smart select does not select TypeScript object type, #39618

Standard library/DOM types

For these bugs, write Typescript types for new (or existing) standard library entries, then run generation tasks to get the new types into the built files.

  • NumberFormatOptions is missing currencySign option, #40622
  • Service worker types for service worker event listener, #40153
  • lib.dom.d.ts window interfaces missing "gamepadconnected" and "gamepaddisconnected", #39425
  • MediaTrackConstraintsSet misses torch, #39010
  • HTMLFormControlsCollection namedItem should return only form input elements, #39003
  • transferable streams is missing, #38723
  • TS 3.9+ missing registerProperty method in CSS, #38593
  • The lib.dom.d.ts is missing some of types defined by Web Speech API (e.g. SpeechRecognitionErrorCode), #37046
  • Property 'sheet' does not exist on type 'SVGStyleElement', #36896

Documentation

  • Object.freeze after object creation doesn't error, #32253
  • wiki doc: @template reference re: jsdoc (and old usejsdoc.org reference), #31885

Community tooling

  • Add diff chunk header lines to Git, #36185
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment