Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to instantiate SVGLength / SVGAngle? #2367

Closed
duncanmak opened this issue Mar 15, 2015 · 2 comments
Closed

How to instantiate SVGLength / SVGAngle? #2367

duncanmak opened this issue Mar 15, 2015 · 2 comments
Labels
Needs Proposal This issue needs a plan that clarifies the finer details of how it could be implemented. Suggestion An idea for TypeScript

Comments

@duncanmak
Copy link

I came across this explanation from @RyanCavanaugh on StackOverflow, http://stackoverflow.com/questions/26220243/instantiating-new-htmlelement-in-typescript

It looks like SVGLength and SVGAngle also fit in this category.

Is there something we can do so that these types can be instantiated? In JS today (Chrome 41), new SVGLength() throws an exception.

Idea: Perhaps this is a case where the 1.5 annotations can be used to offer some explanation for what to do.

@danquirk
Copy link
Member

The right solution might be something as simple as marking the constructors private (#2341) or some other uncallable annotation

@danquirk danquirk added the Suggestion An idea for TypeScript label Mar 16, 2015
@mhegazy mhegazy added the Needs Proposal This issue needs a plan that clarifies the finer details of how it could be implemented. label Dec 9, 2015
@RyanCavanaugh
Copy link
Member

These classes can still be extended, so they need a public constructor. Seems like we're just not going to fix this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Proposal This issue needs a plan that clarifies the finer details of how it could be implemented. Suggestion An idea for TypeScript
Projects
None yet
Development

No branches or pull requests

4 participants