mirror of
https://github.com/flarum/framework.git
synced 2024-11-25 09:41:49 +08:00
fix: incorrect return type on pushPayload
(#3226)
This commit is contained in:
parent
dc661bf144
commit
a2f417e9c5
|
@ -94,7 +94,7 @@ export default class Store {
|
|||
* within the 'data' key of the payload.
|
||||
*/
|
||||
pushPayload<M extends Model>(payload: ApiPayloadSingle): ApiResponseSingle<M>;
|
||||
pushPayload<Ms extends Model[]>(payload: ApiPayloadPlural): ApiResponseSingle<Ms[number]>;
|
||||
pushPayload<Ms extends Model[]>(payload: ApiPayloadPlural): ApiResponsePlural<Ms[number]>;
|
||||
pushPayload<M extends Model | Model[]>(payload: ApiPayload): ApiResponse<FlatArray<M, 1>> {
|
||||
if (payload.included) payload.included.map(this.pushObject.bind(this));
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user