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

Need explicit support for unknown types #9341

Open
gkdn opened this issue May 12, 2016 · 1 comment
Open

Need explicit support for unknown types #9341

gkdn opened this issue May 12, 2016 · 1 comment
Assignees

Comments

@gkdn
Copy link
Contributor

gkdn commented May 12, 2016

Currently unknown type are represented implicitly with native JsType interfaces but this is not a future proof solution since Closure supports interfaces. As a result those native JsType interfaces actually point to a real known type.
We should have a more explicit support for unknown types like: @jstype(name=JsType.UNKNOWN)

@rluble

@gkdn gkdn self-assigned this May 12, 2016
@gkdn gkdn added this to the 2.8 milestone May 12, 2016
@gkdn gkdn removed this from the 2.8 milestone Jul 8, 2016
@rluble
Copy link
Contributor

rluble commented Jan 25, 2017

Decided to use name='*' and name='?' to mode the types "any" and "unknown" respectively.

Code review at https://gwt-review.googlesource.com/#/c/17620/

hubot pushed a commit that referenced this issue Jan 26, 2017
Name '?' (aka. unknown type) should be preferred over 'Object' when the
type is unknown while '*' (aka. any) as the super type of any type in
JavaScript (incl. primitives).

For GWT there are no implications on the generated code however other
tools could utilize this value for better type information.

Bug: #9341
Bug-Link: #9341
Change-Id: If07125d9c7eab21e7b11858fdfde0b84eb2886bd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants