-
Notifications
You must be signed in to change notification settings - Fork 4.2k
minor fix for typo, indent, link, and sample code, etc #4993
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
base: master
Are you sure you want to change the base?
Conversation
@@ -100,7 +100,7 @@ You can enable all the supported ES2015 features at once by adding the `es2015` | |||
|
|||
```kotlin | |||
tasks.withType<KotlinJsCompile>().configureEach { | |||
kotlinOptions { | |||
compilerOptions { |
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.
JFYI
IMO:
kotlinOptions
is deprecated, should use compilerOptions
instead
If you wanted to create a new class which implements the `Drawable` interface, and have the same behavior with `Circle` | ||
class **except** for the value of the `color` property, you still need to add implementations for each member function | ||
of the `Drawable` interface: | ||
|
||
```kotlin | ||
class RedCircle(val circle: Circle) : Circle { | ||
|
||
class RedCircle(val circle: Circle) : Drawable { |
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.
JFYI
IMO:
if class RedCircle
extends class Circle
, it will inherit all the member functions, which means there will be no necessary to implement func draw()
and resize()
so I think the sample code here will confuse the readers, and I suggest to change it
@@ -37,7 +37,7 @@ Create a project using the Kotlin Multiplatform wizard: | |||
> | |||
{style="note"} | |||
|
|||
2. In **composeApp** | **Tasks** | **kotlin browser**, select and run the **wasmJsBrowserDevelopmentRun** task. | |||
2. In **wasmdemo** | **Tasks** | **kotlin browser**, select and run the **wasmJsBrowserDevelopmentRun** task. |
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.
JFYI
the demo project name was changed to WasmDemo
, but this content still use the old name composeApp
@@ -235,7 +235,7 @@ This feature tells the compiler to apply the annotation to all relevant parts of | |||
|
|||
* **`get`**: the getter method. | |||
|
|||
* **`set_param`**: the parameter of the setter method, if the property is defined as `var`. | |||
* **`setparam`**: the parameter of the setter method, if the property is defined as `var`. |
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.
IMO
I think setparam
is the correct use-site target name
@sarahhaggarty |
docs/topics/serialization.md
Outdated
data class Data(val a: Int, val b: String) | ||
|
||
fun main() { | ||
val obj = Json.decodeFromString<Data>("""{"a":42, "b": "str"}""") |
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.
val obj = Json.decodeFromString<Data>("""{"a":42, "b": "str"}""") | |
val obj = Json.decodeFromString<Data>("""{"a":42, "b": "str"}""") |
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.
fixed
docs/topics/serialization.md
Outdated
data class Data(val a: Int, val b: String) | ||
|
||
fun main() { | ||
val json = Json.encodeToString(Data(42, "str")) |
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.
val json = Json.encodeToString(Data(42, "str")) | |
val json = Json.encodeToString(Data(42, "str")) |
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.
fixed
Change List