Flow: Missing type definitions for SVG elements

Created on 25 Aug 2016  Â·  12Comments  Â·  Source: facebook/flow

Many of the MDN docs for SVG elements seem to specify the same interface as corresponding HTML elements. The SVGTitleElement element is the same in SVG and the DOM for all intents and purposes. But several elements are specific only to SVG and it would be nice to get them added.

These are a couple examples:
https://developer.mozilla.org/en-US/docs/Web/API/SVGElement
https://developer.mozilla.org/en-US/docs/Web/API/SVGRect

Library definitions help wanted

All 12 comments

I would like to help since I need these definitions too :)
How can I contribute ?

Sounds like something that could go into flow-typed?

Afaik, flow-typed focuses on _third-party_ libraries.
@nmote can you confirm whether lib/dom.js would be the right place for SVG definitions?

What is the status of this issue? Do you mind if do a PR?

I have some work on a branch that I put a couple hours into, but no PR yet, I was looking at creating a PR in the next day or so.

@jgebhardt Right, core libdefs still belong here. There's talk of moving them all to flow-typed but that hasn't happened yet.

@aackerman any updates on this?

still nothing ?

@emarukyan it sure seems that way– luckily, pull requests are accepted :)

@lionelB and others who want to help, the process should be fairly straightforward, though a bit laborious:
Comb through the SVG spec and translate any type definitions to Flow declarations in https://github.com/facebook/flow/blob/master/lib/dom.js. It might make sense to split this up by interface.

@jgebhardt thx! I will take a look

I started here https://github.com/facebook/flow/pull/4551
Who want to help a can share access for fork.

This probably can be closed in favor of #4551.
/cc @vkurchatkin

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghost picture ghost  Â·  3Comments

bennoleslie picture bennoleslie  Â·  3Comments

l2silver picture l2silver  Â·  3Comments

ctrlplusb picture ctrlplusb  Â·  3Comments

john-gold picture john-gold  Â·  3Comments