Skip to content

Commit

Permalink
Model: allow numbers to be saved
Browse files Browse the repository at this point in the history
  • Loading branch information
jcbrand committed Nov 19, 2023
1 parent 26e1267 commit c356407
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 @@ -381,7 +381,7 @@ class Model extends EventEmitter(Object) {
* If the server returns an attributes hash that differs, the model's
* state will be `set` again.
* @param {string|Attributes} [key]
* @param {string|Options} [val]
* @param {number|string|Options} [val]
* @param {Options} [options]
*/
save(key, val, 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 @@ -202,10 +202,10 @@ export class Model extends Model_base {
* If the server returns an attributes hash that differs, the model's
* state will be `set` again.
* @param {string|Attributes} [key]
* @param {string|Options} [val]
* @param {number|string|Options} [val]
* @param {Options} [options]
*/
save(key?: string | Attributes, val?: string | Options, options?: Options): any;
save(key?: string | Attributes, val?: number | 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 c356407

Please sign in to comment.