Skip to content

Commit

Permalink
Declare sort options to be optional
Browse files Browse the repository at this point in the history
  • Loading branch information
jcbrand committed Feb 8, 2024
1 parent 870f20b commit 4ff7282
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 @@ -564,7 +564,7 @@ class Collection extends EventEmitter(Object) {
* Force the collection to re-sort itself. You don't need to call this under
* normal circumstances, as the set will maintain sort order as each item
* is added.
* @param {Options} options
* @param {Options} [options]
*/
sort(options) {
let comparator = this.comparator;
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 @@ -242,9 +242,9 @@ export class Collection extends Collection_base {
* Force the collection to re-sort itself. You don't need to call this under
* normal circumstances, as the set will maintain sort order as each item
* is added.
* @param {Options} options
* @param {Options} [options]
*/
sort(options: Options): this;
sort(options?: Options): this;
models: any;
/**
* Pluck an attribute from each model in the collection.
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 4ff7282

Please sign in to comment.