Skip to content

Commit 382578e

Browse files
committedApr 6, 2024
Fix pushPayload types
1 parent 9261baa commit 382578e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
 

‎packages/legacy-compat/src/index.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,9 @@ export function normalize(this: Store, modelName: string, payload: ObjectValue)
255255
@param {Object} inputPayload
256256
*/
257257
// TODO @runspired @deprecate pushPayload in favor of looking up the serializer
258-
export function pushPayload(this: Store, modelName: string, inputPayload: ObjectValue): void {
258+
export function pushPayload(this: Store, inputPayload: ObjectValue): void;
259+
export function pushPayload(this: Store, modelName: string, inputPayload: ObjectValue): void;
260+
export function pushPayload(this: Store, modelNameOrPayload: string | ObjectValue, inputPayload?: ObjectValue): void {
259261
upgradeStore(this);
260262
assert(
261263
`Attempted to call store.pushPayload(), but the store instance has already been destroyed.`,

0 commit comments

Comments
 (0)