-
-
Notifications
You must be signed in to change notification settings - Fork 49
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
Add JSBridgedType and JSBridgedClass #26
Conversation
8b8ef8f
to
f08c56c
Compare
ab414d7
to
000fe5b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good but I added some comments. And please add test cases 🙏
Co-Authored-By: Yuta Saito <11702759+kateinoigakukun@users.noreply.github.com>
It’s better to use guard/if-let instead.
Please let me know when it's ready for review again 👍 |
@@ -0,0 +1,41 @@ | |||
/// Use this protocol when your type has no single JavaScript class. | |||
/// For example, a union type of multiple classes or primitive values. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this comment give an example of such type?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure. Would it be OK to link to DOMKit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, please do 👍
Co-authored-by: Max Desiatov <max@desiatov.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fantastic 👏
Just a minor indentation issue, but otherwise LGTM 👍
Pending the merger of swiftwasm/JavaScriptKit#26, everything needed for the output of `webidl2swift` to work will be included in the shipping version of JavaScriptKit! I made several changes to align the APIs and fixed a bug where callback protocols could not be passed as a function. * Mostly working, except for when it doesn’t (enums containing objects and primitives) JavaScriptKit a87af4e * More changes to get it finished! * Correctly set the ancestor for callback interfaces * It works! * Updates to match latest JSKit * Fix lint errors * Last updates for compatibility * Remove unnecessary fatalError in failable initializer * Record the file name tokenization errors occurred in * Address spec update that replaces void with undefined * Update Parser.swift * Fixes to asynciterable * Update Parser.swift * Update Parser.swift * Update IntermediateRepresentation.swift * Sort list of undefined types so it’s stable * Throw a fatalError when a member type is unimplemented * Add updates from review * void → undefined * Also update the other webidl files * Re-add void support * Update Sources/WebIDL/IntermediateRepresentation/Member Nodes/MethodNode.swift Co-authored-by: Max Desiatov <max@desiatov.com> Co-authored-by: Max Desiatov <max@desiatov.com>
Ref #21.
This allows DOMKit to build, and implements
JSBridgedClass
onJSError
andJSDate
.