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

Emit { [x:string]: any } for IDL object type on arguments #290

Open
saschanaz opened this issue Sep 3, 2017 · 0 comments
Open

Emit { [x:string]: any } for IDL object type on arguments #290

saschanaz opened this issue Sep 3, 2017 · 0 comments

Comments

@saschanaz
Copy link
Contributor

saschanaz commented Sep 3, 2017

For example, document.scrollIntoView should receive object | boolean while PaymentResponse.prototype.details should still be any to allow arbitrary property access. (microsoft/TypeScript#18228)

PS: WebIDL object can be safely mapped to { [x:string]: any }, so we can use it so that both object on function argument and class member can be mapped without any complexity.

@saschanaz saschanaz changed the title Emit object for IDL object type on arguments Emit { [x:string]: any } for IDL object type on arguments Sep 15, 2017
RReverser added a commit to RReverser/TSJS-lib-generator that referenced this issue Sep 5, 2019
This type on the TS side is relatively new, which is probably why it wasn't used in the first place, but gives more precise definitions and, so, better type checking.

As a side-effect, fixes microsoft#290 (although in a different way).
RReverser added a commit to RReverser/TSJS-lib-generator that referenced this issue Sep 5, 2019
This type on the TS side is relatively new, which is probably why it wasn't used in the first place, but gives more precise definitions and, so, better type checking.

As a side-effect, fixes microsoft#290 (although in a different way).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant