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

ResizeObserver API declarations missing #37861

Closed
5 tasks done
manucorporat opened this issue Apr 9, 2020 · 10 comments · Fixed by microsoft/TypeScript-DOM-lib-generator#847 or microsoft/TypeScript-DOM-lib-generator#948
Labels
Bug A bug in TypeScript Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript Help Wanted You can do this
Milestone

Comments

@manucorporat
Copy link

Search Terms

Suggestion

  • lib.dom.ts does not include ResizeObserver API declarations.
  • ResizeObserver is already supported by all modern browser, typescript should provide the typs

Examples

https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver

Checklist

My suggestion meets these guidelines:

  • This wouldn't be a breaking change in existing TypeScript/JavaScript code
  • This wouldn't change the runtime behavior of existing JavaScript code
  • This could be implemented without emitting different JS based on the types of the expressions
  • This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
  • This feature would agree with the rest of TypeScript's Design Goals.
@orta
Copy link
Contributor

orta commented Apr 9, 2020

Yeah, now that it's in all the main browsers, we'd accept a PR to https://github.com/microsoft/TSJS-lib-generator/ on it 👍

@manucorporat
Copy link
Author

@orta hey! i just tried to prepare the PR:

  bareMessage: 'Attributes cannot accept sequence types',
  context: 'Syntax error at line 23, since `interface ResizeObserverEntry`:\n' +
    ' attribute sequence<ResizeObserverSize> borderBoxSize;\n' +

and got this error...

@orta
Copy link
Contributor

orta commented Apr 9, 2020

I'd make a work in progress PR on that repo, and ask for help if the IDL -> DTS translation requires changes

@m93a
Copy link

m93a commented Apr 12, 2020

GitHub user @strothj implemented the type definitions in a gist. It should be possible to make a PR based on this.

@yooouuri
Copy link

yooouuri commented Sep 2, 2020

Any progress on this?

@pratikmmohite
Copy link

Any updates here ?

@m93a
Copy link

m93a commented Oct 13, 2020

If an issue is marked as “help wanted” and “milestone: backlog”, it means it's low priority. Furthermore there's a really simple walkaround. There is no open PR currently, but if you want this implemented in TS, you can start one 😁️

@sapkra
Copy link

sapkra commented Oct 13, 2020

@m93a What about this PR? microsoft/TypeScript-DOM-lib-generator#847

@MatthiasKunnen
Copy link

There is no open PR currently, but if you want this implemented in TS, you can start one
-m93a

As @sapkra said, microsoft/TypeScript-DOM-lib-generator#847 will fix this issue. Unfortunately the PR is inactive.

@m93a, In case you didn't know, just beneath the title of the issue and in the section on the right you can see if there are any pull requests that address the issue.

image

@timocov
Copy link
Contributor

timocov commented Nov 8, 2020

Unfortunately the PR is inactive.

Since that PR is inactive, I've done required changes in microsoft/TypeScript-DOM-lib-generator#948 (that's PR on top of changes from microsoft/TypeScript-DOM-lib-generator#847).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript Help Wanted You can do this
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants