- Notifications
You must be signed in to change notification settings - Fork 148
Update documentation to reflect (anticipated) v0.5.0 #38
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
7 commits Select commit Hold shift + click to select a range
a9d80fc Update documentation to reflect (anticipated) v0.5.0
gzm0 f6c0398 Add page about usage of SBT plugin
gzm0 64d3377 Improve documentation structure
gzm0 dbb51da Add links to CLI distribution
gzm0 ffb4a21 Add links to API docs
gzm0 fb0c5f2 Fix #25: Add tutorial to quick start new devs
gzm0 d7be454 Add big "latest release" button on front page
gzm0 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Update documentation to reflect (anticipated) v0.5.0
- Loading branch information
commit a9d80fc1c7ef1fa3220a513791f7d46a48f6b60a
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| | @@ -15,3 +15,41 @@ called from JavaScript code. | |
| | ||
| * [Call JavaScript APIs from Scala.js](calling-javascript.html) | ||
| * [Export Scala.js APIs to JavaScript](export-to-javascript.html) | ||
| | ||
| ## <a name="type-correspondance"></a> Type Correspondance | ||
| Some Scala types are directly mapped to corresponding underlying | ||
| JavaScript types. These correspondances can be used when calling | ||
| Scala.js code from JavaScript and when defining typed interfaces for | ||
| JavaScript code. | ||
| | ||
| <table class="table table-bordered"> | ||
| <thead> | ||
| <tr><th>Scala type</th><th>JavaScript type</th><th>Restrictions</th></tr> | ||
| </thead> | ||
| <tbody> | ||
| <tr><td>java.lang.String</td><td>string</td><td></tr></tr> | ||
| <tr><td>scala.Boolean</td><td>boolean</td><td></td></tr> | ||
| <tr><td>scala.Char</td><td><i>opaque</i></td><td></td></tr> | ||
| <tr><td>scala.Byte</td><td>number</td><td>integer, range (-128, 127)</td></tr> | ||
| <tr><td>scala.Short</td><td>number</td><td>integer, range (-32768, 32767)</td></tr> | ||
| <tr><td>scala.Int</td><td>number</td><td>integer, range (-2147483648, 2147483647)</td></tr> | ||
| <tr><td>scala.Long</td><td><i>opaque</i></td><td></td></tr> | ||
| <tr><td>scala.Float</td><td>number</td><td></td></tr> | ||
| <tr><td>scala.Double</td><td>number</td><td></td></tr> | ||
| <tr><td>scala.Unit</td><td>undefined</td><td></td></tr> | ||
| <tr><td>scala.Null</td><td>null</td><td></td></tr> | ||
| <tr><td>subtypes of js.Object</td><td><i>corresponding JavaScript | ||
| type</i></td><td>see <a href="calling-javascript.html">calling JavaScript guide</a></td></tr> | ||
| There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This line or another line should say something about all the other types extending | ||
| <tr> | ||
| <td> | ||
| other Scala classes<br /> | ||
| <small>including value classes</small> | ||
| </td> | ||
| <td> | ||
| <i>opaque, except for exported methods</i><br /> | ||
| <small>Note: <code>toString()</code> is always exported</small> | ||
| </td> | ||
| <td>see <a href="export-to-javascript.html">exporting Scala.js APIs to JavaScript</a></td> | ||
| </tr> | ||
| </tbody> | ||
| </table> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
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.
"In general" -> "Most of the time"? I believe the former means more "always" than "most of the time".