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

Include browser compatibility notes in lib.d.ts comments #3250

Closed
flcdrg opened this issue May 22, 2015 · 4 comments
Closed

Include browser compatibility notes in lib.d.ts comments #3250

flcdrg opened this issue May 22, 2015 · 4 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

@flcdrg
Copy link

flcdrg commented May 22, 2015

After experiencing a problem caused by using Element.classList in some TypeScript code that was intended to run on IE8, I'm thinking it would be nice to include in the comments for methods known browser compatibility issues.

If this were done in a 'conventional' way, then it could also be interpreted by tooling much the way that the WebEssentials extension for Visual Studio can show browser support tooltips for CSS. eg.
css browser support

@duanyao
Copy link

duanyao commented May 22, 2015

Seems we want something like this in lib.d.ts:

interface Element {
  @since("IE10", "Chrome8", "Firefox3.6", "DOM3")
  @deprecated("IE20", "Chrome80", "Firefox80", "DOM8") // just a joke
  @removed("IE30", "Chrome100", "Firefox100", "DOM10") // just a joke
  classList: DOMTokenList;
}

@flcdrg
Copy link
Author

flcdrg commented May 22, 2015

That looks interesting

@mhegazy
Copy link
Contributor

mhegazy commented Dec 9, 2015

We will need a proposal on how the annotations would be added, either JSDoc comments with some special tags, or using #2900 (proposed and not implemented yet).

@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

We now copy in MDN comments, which should include the most relevant bits. @deprecated is also now available

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

5 participants