-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(lib): type updates and tweaks
- Loading branch information
Showing
4 changed files
with
17 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,7 @@ | ||
interface OxClient { | ||
[exportKey: string]: Function; | ||
IsPlayerLoaded(): boolean; | ||
GetPlayerData(): { userId: number; charId: number; stateId: string }; | ||
GetPlayerData(key: string): any; | ||
} | ||
import { OxCore, OxCommon } from 'lib'; | ||
|
||
export const Ox: OxClient = exports.ox_core as any; | ||
interface OxClient extends OxCommon {} | ||
|
||
export const Ox = OxCore as OxClient; | ||
|
||
export * from './player'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import type { GetTopVehicleStats, GetVehicleData } from 'common/vehicles'; | ||
|
||
export interface OxCommon { | ||
[key: string]: (...args: any[]) => any; | ||
GetTopVehicleStats: typeof GetTopVehicleStats; | ||
GetVehicleData: typeof GetVehicleData; | ||
} | ||
|
||
export const OxCore = exports.ox_core as OxCommon; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters