Skip to content

Commit

Permalink
Make first parameter optional
Browse files Browse the repository at this point in the history
  • Loading branch information
jcbrand committed Nov 15, 2023
1 parent f64837a commit bf7c4ff
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/collection.js
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ class Collection extends EventEmitter(Object) {
* Return models with matching attributes. Useful for simple cases of
* `filter`.
* @param {Attributes} attrs
* @param {boolean} first
* @param {boolean} [first]
*/
where(attrs, first) {
return this[first ? 'find' : 'filter'](attrs);
Expand Down
4 changes: 2 additions & 2 deletions src/types/collection.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,9 @@ export class Collection extends Collection_base {
* Return models with matching attributes. Useful for simple cases of
* `filter`.
* @param {Attributes} attrs
* @param {boolean} first
* @param {boolean} [first]
*/
where(attrs: Attributes, first: boolean): any;
where(attrs: Attributes, first?: boolean): any;
/**
* Return the first model with matching attributes. Useful for simple cases
* of `find`.
Expand Down
2 changes: 1 addition & 1 deletion src/types/collection.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit bf7c4ff

Please sign in to comment.