Skip to content

Commit

Permalink
Allow .save() to be called without parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
jcbrand committed Nov 18, 2023
1 parent bf7c4ff commit 26e1267
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/model.js
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ class Model extends EventEmitter(Object) {
* Set a hash of model attributes, and sync the model to the server.
* If the server returns an attributes hash that differs, the model's
* state will be `set` again.
* @param {string|Attributes} key
* @param {string|Attributes} [key]
* @param {string|Options} [val]
* @param {Options} [options]
*/
Expand Down
4 changes: 2 additions & 2 deletions src/types/model.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,11 +201,11 @@ export class Model extends Model_base {
* Set a hash of model attributes, and sync the model to the server.
* If the server returns an attributes hash that differs, the model's
* state will be `set` again.
* @param {string|Attributes} key
* @param {string|Attributes} [key]
* @param {string|Options} [val]
* @param {Options} [options]
*/
save(key: string | Attributes, val?: string | Options, options?: Options): any;
save(key?: string | Attributes, val?: string | Options, options?: Options): any;
/**
* Destroy this model on the server if it was already persisted.
* Optimistically removes the model from its collection, if it has one.
Expand Down
2 changes: 1 addition & 1 deletion src/types/model.d.ts.map

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

0 comments on commit 26e1267

Please sign in to comment.