@battle-racing/br-common-lib 2.5.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/types/response/Response.d.ts +2 -2
- package/dist/types/response/SuccesResponse.d.ts +1 -1
- package/dist/types/response/SuccessResponse.d.ts +5 -0
- package/dist/types/response/SuccessResponse.js +2 -0
- package/dist/types/response/index.d.ts +1 -1
- package/dist/types/socket/serverToClient/SocketKartServerToClientEventsParams.d.ts +4 -1
- package/package.json +1 -1
- package/src/types/response/Response.ts +2 -2
- package/src/types/response/{SuccesResponse.ts → SuccessResponse.ts} +1 -1
- package/src/types/response/index.ts +1 -1
- package/src/types/socket/serverToClient/SocketKartServerToClientEventsParams.ts +1 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { ErrorResponse } from './ErrorResponse';
|
|
2
|
-
import type {
|
|
3
|
-
export type Response<T> =
|
|
2
|
+
import type { SuccessResponse } from './SuccessResponse';
|
|
3
|
+
export type Response<T> = SuccessResponse<T> | ErrorResponse;
|
|
@@ -14,7 +14,10 @@ export interface SocketKartEventsParams {
|
|
|
14
14
|
'kart:updated': {
|
|
15
15
|
kart: Kart;
|
|
16
16
|
};
|
|
17
|
-
'kart:init:response': Response<
|
|
17
|
+
'kart:init:response': Response<{
|
|
18
|
+
kart: Kart;
|
|
19
|
+
gameTrack: GameTrack;
|
|
20
|
+
}>;
|
|
18
21
|
/** Whenever the Game Track config changed */
|
|
19
22
|
'kart:gameTrack:updated': {
|
|
20
23
|
gameTrack: GameTrack;
|
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { ErrorResponse } from './ErrorResponse';
|
|
2
|
-
import type {
|
|
2
|
+
import type { SuccessResponse } from './SuccessResponse';
|
|
3
3
|
|
|
4
|
-
export type Response<T> =
|
|
4
|
+
export type Response<T> = SuccessResponse<T> | ErrorResponse;
|
|
@@ -17,7 +17,7 @@ export type SocketKartPowerUpEventsParams = {
|
|
|
17
17
|
export interface SocketKartEventsParams {
|
|
18
18
|
'kart:updated': { kart: Kart };
|
|
19
19
|
// Response from server
|
|
20
|
-
'kart:init:response': Response<Kart>;
|
|
20
|
+
'kart:init:response': Response<{ kart: Kart; gameTrack: GameTrack }>;
|
|
21
21
|
/** Whenever the Game Track config changed */
|
|
22
22
|
'kart:gameTrack:updated': { gameTrack: GameTrack };
|
|
23
23
|
/** When the physical button of the game track is pressed */
|