You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried adding the following source to idlSources.json:
{
"url": "https://www.w3.org/TR/css-typed-om-1/",
"title": "CSS Typed OM Level 1"
}
but the auto-generated namespace contained function in(...) (for CSS.in(123)), which is illegal, as in is a reserved word. Trying to use removedTypes.json to override the namespace was a bust, as the prune function assumes string-based array filtering (namespace has named objects).
Also, the URL for the Speech API is outdated and causes an un-handled promise rejection (in IDL fetching script). The new URL is: https://wicg.github.io/speech-api/
The issue is therefore about the assumption regarding @types/w3c-css-typed-object-model-level-1 no longer being needed. That assumption has proven to be incorrect, as the new built-in types don't include everything that was defined there.
A possible solution is to "revive" @types/w3c-css-typed-object-model-level-1 (or whatever shorter name) with what's missing, probably with namespace usage this time around.
After the revert, a lot of the package will still need to be removed, right? Or, wait, if it only includes CSS Typed OM types, then a simple revert should be good enough.
I encountered this updating our application from Angular 9 to 10, since 10 brings in TS 1.9. Our app scopes CSS to a class so it can be overridden in tests.
For any relative TS newbies like me who stumble on this, I was able to workaround by changing:
Activity
AviVahl commentedon May 13, 2020
The actual change was in another repository: microsoft/TypeScript-DOM-lib-generator#716
TypeScript syncs its
.d.tsfiles with it.It appears that by moving CSSOM types to be a built-in part of TypeScript, the following spec was missed: https://www.w3.org/TR/css-typed-om-1/
It contains the IDLs for functions like
CSS.px, previously available via@types/w3c-css-typed-object-model-level-1.Kagami Sascha Rosylight (@saschanaz) Nathan Shively-Sanders (@sandersn)
I tried adding the following source to
idlSources.json:but the auto-generated namespace contained
function in(...)(forCSS.in(123)), which is illegal, asinis a reserved word. Trying to useremovedTypes.jsonto override the namespace was a bust, as theprunefunction assumes string-based array filtering (namespace has named objects).Also, the URL for the Speech API is outdated and causes an un-handled promise rejection (in IDL fetching script). The new URL is: https://wicg.github.io/speech-api/
saschanaz commentedon May 14, 2020
Typed OM so far hasn't get enough stable implementations, and thus doesn't meet the standard to be included in the lib.
That said, the namespace compatibility is a thing. I hope TS could merge namespace and interface seamlessly.
AviVahl commentedon May 14, 2020
I understand. Makes sense.
The issue is therefore about the assumption regarding
@types/w3c-css-typed-object-model-level-1no longer being needed. That assumption has proven to be incorrect, as the new built-in types don't include everything that was defined there.A possible solution is to "revive"
@types/w3c-css-typed-object-model-level-1(or whatever shorter name) with what's missing, probably withnamespaceusage this time around.saschanaz commentedon May 23, 2020
True, DefinitelyTyped/DefinitelyTyped#43361 should be reverted.
sandersn commentedon May 26, 2020
After the revert, a lot of the package will still need to be removed, right? Or, wait, if it only includes CSS Typed OM types, then a simple revert should be good enough.
saschanaz commentedon May 26, 2020
A revert should use
namespace CSS, otherwise a simple revert looks fine.sandersn commentedon May 26, 2020
PR is up at DefinitelyTyped/DefinitelyTyped#45076
dpraul commentedon Jun 25, 2020
I encountered this updating our application from Angular 9 to 10, since 10 brings in TS 1.9. Our app scopes
CSSto a class so it can be overridden in tests.For any relative TS newbies like me who stumble on this, I was able to workaround by changing:
to: