Giter VIP home page Giter VIP logo

Comments (6)

teamolhuang avatar teamolhuang commented on June 9, 2024 1
  • The field is called alternative_name .
  • That field is almost exclusively used for deprecated prefixed APIs,
  • Truly deprecated aliases just don't have it's own data at all

Maybe, I guess maybe, just don't use that field as a source of deprecation indication then?
You're generating deprecation annotations from a field that its name doesn't suggest it as a flag of deprecation.
Is there any official source clearly suggesting it as deprecation indicator?
If not, there's no need for MDN to remove alternative_name, the only thing needed is that you clear up the shit you dumped right into the official repository two years ago and now spreaded into official documents like Microsoft Learn.

from typescript-dom-lib-generator.

saschanaz avatar saschanaz commented on June 9, 2024

Hmm.

  1. If you closely look at #1082, you can see that it's not about a decision for specific properties but about reading MDN data and add deprecated tags based on it.
  2. The data is using MDN's alternative_name (which is mapped as preferred_name there), you can see the compatibility table of scrollX's MDN page has pageXOffset for Chrome for example.
  3. That field is almost exclusively used for deprecated prefixed APIs, but later MDN got separate pages for pageX/YOffset with separate compat tables. And then they forgot to remove it from the table of scrollX/Y.
  4. So TS still has them marked as deprecated.

tl;dr: MDN should remove alternative_name from the tables of scrollX/Y.

from typescript-dom-lib-generator.

chandraaditya avatar chandraaditya commented on June 9, 2024

@saschanaz but isn't it true that pageX/YOffset is an alternative name for scrollX/Y, at the same time it's not deprecated? Shouldn't they be marked deprecated ONLY and ONLY if they have been marked as deprecated if MDN also marks it as deprecated?

from typescript-dom-lib-generator.

saschanaz avatar saschanaz commented on June 9, 2024

There's no need for alternative_name when there's a separate table, it's fully redundant.

The thing is, MDN generally only has data for the original API instead of the aliases (see https://developer.mozilla.org/en-US/docs/Web/API/DOMMatrix for example), so there's no "if and only if". Truly deprecated aliases just don't have it's own data at all.

from typescript-dom-lib-generator.

saschanaz avatar saschanaz commented on June 9, 2024

MDN decided to remove pages for pageOffsetX/Y in favor of scrollX/Y. I'd like to follow the decision unless there's a strong reason not to.

@github-actions close

from typescript-dom-lib-generator.

github-actions avatar github-actions commented on June 9, 2024

Closing because @saschanaz is one of the code-owners of this repository.

from typescript-dom-lib-generator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.