Skip to content

Commit

Permalink
feat: improve types
Browse files Browse the repository at this point in the history
  • Loading branch information
yannbcf committed Jun 19, 2023
1 parent 4887495 commit 1196a23
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@yannbcf/altv-rpc",
"version": "0.4.3",
"version": "0.4.4",
"type": "module",
"author": "YannBcf",
"main": "./dist/index.js",
Expand Down
6 changes: 3 additions & 3 deletions src/events/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ export type AltClientEvent = {
entityHitEntity: { damager: alt.Entity; target: alt.Entity; weaponHash: number };
};

export type ClientEvent = AltClientEvent & {
removeEvent: () => void;
};
export type ClientEvent = {
[K in keyof AltClientEvent]: AltClientEvent[K] & { removeEvent: () => void }
}

export function getAltClientEventKeys(): (keyof alt.IClientEvent)[] {
const events = [
Expand Down
6 changes: 3 additions & 3 deletions src/events/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ export type AltServerEvent = {
metaChange: { target: alt.BaseObject; key: string; value: AllowedAny; oldValue: AllowedAny };
};

export type ServerEvent = AltServerEvent & {
removeEvent: () => void;
};
export type ServerEvent = {
[K in keyof AltServerEvent]: AltServerEvent[K] & { removeEvent: () => void }
}

export function getAltServerEventKeys(): (keyof alt.IServerEvent)[] {
const events = [
Expand Down

0 comments on commit 1196a23

Please sign in to comment.