Skip to content

Commit c25e13f

Browse files
Add an example
Co-authored-by: zetashift <[email protected]>
1 parent 3ebdb55 commit c25e13f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

CONTRIBUTING.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,12 @@ Please:
5454
* Use `def` for read-only properties unless there is a compelling reason it should be a `val`
5555
(i.e., the spec definitively states it is constant)
5656
* Use `Double` for integer-values that can fall outside the range of `Int`
57-
* Prefer adding overloads instead of using union `|` types for method and constructor parameters
57+
* Prefer adding overloads instead of using union `|` types for method and constructor parameters. For example:
58+
```diff
59+
- def createElement(tagName: String, options: String | ElementCreationOptions = js.native): Element = js.native
60+
+ def createElement(tagName: String): Element = js.native
61+
+ def createElement(tagName: String, options: String): Element = js.native
62+
+ def createElement(tagName: String, options: ElementCreationOptions): Element = js.native
5863
* Add scaladocs via copy-paste from MDN
5964

6065

0 commit comments

Comments
 (0)