Comments (6)
- The field is called
alternative_name
. That field is
almostexclusively 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.
Hmm.
- 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.
- The data is using MDN's
alternative_name
(which is mapped aspreferred_name
there), you can see the compatibility table of scrollX's MDN page has pageXOffset for Chrome for example. - 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.
- 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.
@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.
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.
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.
Closing because @saschanaz is one of the code-owners of this repository.
from typescript-dom-lib-generator.
Related Issues (20)
- CSSStyleDeclaration misses dashed attributes
- Type for `DataTransferItem.kind` is broader than implied by spec HOT 1
- `ReadableStreamReadDoneResult` shouldn't be generic and should have `value: undefined`
- `ReadableStream` should be async-iterable
- fetch type "GET" or "HEAD" with a body should be a type error
- Make the chunk parameter of ReadableStreamDefaultController.enqueue non optional
- ResizeObserver not present on the Window interface HOT 1
- `ServiceWorkerRegistration.update()` should return `Promise<ServiceWorkerRegistration>`
- Feature request: split whatwg definitions in separate files
- Unexpected Safari-specific event init options
- ReadableStream.from() method? HOT 1
- IntersectionObserverEntry: rootBounds property is never null HOT 2
- CSS custom highlights API? HOT 1
- Element API like after,before,remove,replaceWith has wrong MDN link
- Node.parentElement should be Element, not HTMLElement HOT 1
- `String.prototype.charCodeAt` accepts `undefined` HOT 3
- `ReadableStreamGenericReader.closed` shoud be `readonly Promise<void>`
- WebMIDI
- NotificationOptions is missing actions option HOT 2
- Make DOM types available without polluting the global scope with 790 global variables HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from typescript-dom-lib-generator.