Typescript: SVG interfaces missing

Created on 9 May 2018  路  4Comments  路  Source: microsoft/TypeScript

SVG 1.1 defines 80 elements. SVG 2 defines 77. TypeScript has 61 interfaces for SVG elements, based on the type declarations for createElementNS(). Some examples of SVG interfaces missing in TypeScript (many of them are defined by both SVG versions):

Based on this, some questions:

  • How reliable are TypeScript types?
  • How reliable and updated are the sources that TypeScript uses to get its types?
  • Does someone spend time verifying the results of the automatically generated typings?
  • Are there any automated tests in place?
  • Do you recommend the use of TypeScript's DOM-related typings in production?
  • In particular for SVG, what is the source and how are the typings generated?

Overall, I would simply like to know if we are walking on a minefield, and if so to see this stated clearly somewhere.

In my experience, the support for JavaScript standard functions is great. I've never encountered a problem with them. It feels professional, complete, fully covered. With DOM-related declarations I feel the opposite is true - I don't stop finding problems and seeing bug reports. It simply feels like an unfinished job, and I'm very much afraid of making use of it or recommending it to anybody.

Bug lib.d.ts help wanted

Most helpful comment

Regardless of the technical aspect, I am still interested in getting some kind of answer to the questions above.

All 4 comments

PRs welcomed. You can find more information about contributing lib.d.ts fixes at https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md#contributing-libdts-fixes.

For PRs, please see examples.

@mhegazy
@RyanCavanaugh

I fixed this issue! Please confirm 馃檱

Regardless of the technical aspect, I am still interested in getting some kind of answer to the questions above.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

uber5001 picture uber5001  路  3Comments

wmaurer picture wmaurer  路  3Comments

siddjain picture siddjain  路  3Comments

remojansen picture remojansen  路  3Comments

manekinekko picture manekinekko  路  3Comments