-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update re @connec’s notes; split classes section into two sections fo…
…r classes and working with prototypes; make breaking changes examples editable whenever possible
- Loading branch information
1 parent
72b623e
commit e3c22f7
Showing
13 changed files
with
220 additions
and
65 deletions.
There are no files selected for viewing
This file contains 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
2 changes: 2 additions & 0 deletions
2
documentation/examples/breaking_change_bound_generator_function.coffee
This file contains 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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
self = this | ||
f = -> yield self |
3 changes: 3 additions & 0 deletions
3
documentation/examples/breaking_change_function_parameter_default_values.coffee
This file contains 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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
f = (a = 1) -> a | ||
|
||
f(null) # Returns 1 in CoffeeScript 1.x, null in CoffeeScript 2 |
4 changes: 4 additions & 0 deletions
4
documentation/examples/breaking_change_super_in_non-class_methods_refactor_with_apply.coffee
This file contains 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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
A = -> | ||
B = -> | ||
B extends A | ||
B.prototype.foo = -> A::foo.apply this, arguments |
3 changes: 3 additions & 0 deletions
3
documentation/examples/breaking_change_super_in_non-class_methods_refactor_with_class.coffee
This file contains 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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
class A | ||
class B extends A | ||
foo: -> super arguments... |
2 changes: 2 additions & 0 deletions
2
documentation/examples/breaking_change_super_with_arguments.coffee
This file contains 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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
class B extends A | ||
foo: -> super arguments... |
2 changes: 2 additions & 0 deletions
2
documentation/examples/breaking_change_super_without_arguments.coffee
This file contains 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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
class B extends A | ||
foo: -> super() |
This file contains 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
Oops, something went wrong.