-
Notifications
You must be signed in to change notification settings - Fork 261
Added structured types for higer order function parameters #419
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
Changes from all commits
b82bc18
d8093a5
0d7d9b3
7455ae5
d68f7ae
41ce261
6aa5119
9d4aa93
49a296c
40db666
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,6 +21,13 @@ | |
| <signature> | ||
| <added>1.4</added> | ||
| <argument name="function" type="Function"> | ||
| <argument name="index" type="Integer" /> | ||
|
Member
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 receives the html as a second argument. |
||
| <argument name="html" type="String" /> | ||
| <return> | ||
| <type name="htmlString"/> | ||
| <type name="Element"/> | ||
| <type name="jQuery"/> | ||
| </return> | ||
| <desc>A function that returns an HTML string, DOM element(s), or jQuery object to insert before each element in the set of matched elements. Receives the index position of the element in the set as an argument. Within the function, <code>this</code> refers to the current element in the set. | ||
| </desc> | ||
| </argument> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,7 +19,7 @@ | |
| </signature> | ||
| <signature> | ||
| <added>1.6</added> | ||
| <argument name="jQuery object" type="jQuery"> | ||
| <argument name="selection" type="jQuery"> | ||
|
Member
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. Can you explain the purpose of this change? I'm not seeing any effect that it's having.
Member
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. The purpose is to avoid confusion when reading the example by using a proper variable name (no spaces). There was a discussion about what that name should be (I think in IRC) and I believe we opted for selection, though I believe even within this PR there are inconsistencies.
Member
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. |
||
| <desc>A jQuery object to match elements against.</desc> | ||
| </argument> | ||
| </signature> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,7 +11,7 @@ | |
| <signature> | ||
| <sample>:eq(-index)</sample> | ||
| <added>1.8</added> | ||
| <argument name="-index" type="Integer"> | ||
| <argument name="indexFromEnd" type="Integer"> | ||
|
Member
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. Maybe I'm missing something but I'm not seeing any effect of these
Member
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. Same as "jQuery object" to "selection", this is just to produce valid variable names in the signatures. |
||
| <desc>Zero-based index of the element to match, counting backwards from the last element. </desc> | ||
| </argument> | ||
| </signature> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,8 +9,11 @@ | |
| </signature> | ||
| <signature> | ||
| <added>1.0</added> | ||
| <argument name="function(index)" type="Function"> | ||
| <argument name="function" type="Function"> | ||
| <desc>A function used as a test for each element in the set. <code>this</code> is the current DOM element.</desc> | ||
| <argument name="index" type="Integer" /> | ||
|
Member
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. The function receives the element as a second argument. |
||
| <argument name="element" type="Element" /> | ||
| <return type="Boolean" /> | ||
| </argument> | ||
| </signature> | ||
| <signature> | ||
|
|
@@ -21,7 +24,7 @@ | |
| </signature> | ||
| <signature> | ||
| <added>1.4</added> | ||
| <argument name="jQuery object" type="Object"> | ||
| <argument name="selection" type="jQuery"> | ||
| <desc>An existing jQuery object to match the current set of elements against.</desc> | ||
| </argument> | ||
| </signature> | ||
|
|
||
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.
Like
append(), this also receives the html of the element as a second argument.