@altv/types-client
Advanced tools
Comparing version 1.4.6 to 1.5.0
135
index.d.ts
@@ -147,2 +147,9 @@ declare module "alt-client" { | ||
export const enum WebSocketReadyState { | ||
Connecting, | ||
Open, | ||
Closing, | ||
Closed | ||
} | ||
export interface IClientEvent { | ||
@@ -152,3 +159,2 @@ anyResourceError: (resourceName: string) => void; | ||
anyResourceStop: (resourceName: string) => void; | ||
/** @beta */ | ||
changedVehicleSeat: (vehicle: Vehicle, oldSeat: number, seat: number) => void; | ||
@@ -158,3 +164,2 @@ connectionComplete: () => void; | ||
disconnect: () => void; | ||
/** @beta */ | ||
enteredVehicle: (vehicle: Vehicle, seat: number) => void; | ||
@@ -165,3 +170,2 @@ gameEntityCreate: (entity: Entity) => void; | ||
keyup: (key: number) => void; | ||
/** @beta */ | ||
leftVehicle: (vehicle: Vehicle, seat: number) => void; | ||
@@ -309,3 +313,2 @@ removeEntity: (object: BaseObject) => void; | ||
* | ||
* @beta | ||
*/ | ||
@@ -319,3 +322,2 @@ export const resourceName: string; | ||
* | ||
* @beta | ||
*/ | ||
@@ -329,3 +331,2 @@ export const version: string; | ||
* | ||
* @beta | ||
*/ | ||
@@ -415,3 +416,3 @@ export const sdkVersion: number; | ||
/** @beta */ | ||
public distanceTo(vector: IVector3): Vector3; | ||
public distanceTo(vector: IVector3): number; | ||
@@ -620,3 +621,2 @@ /** @beta */ | ||
* | ||
* @beta | ||
*/ | ||
@@ -628,3 +628,2 @@ public readonly currentWeaponComponents: Array<number>; | ||
* | ||
* @beta | ||
*/ | ||
@@ -636,3 +635,2 @@ public readonly currentWeaponTintIndex: number; | ||
* | ||
* @beta | ||
*/ | ||
@@ -651,3 +649,2 @@ public readonly currentWeapon: number; | ||
* | ||
* @beta | ||
*/ | ||
@@ -659,3 +656,2 @@ public readonly isInRagdoll: boolean; | ||
* | ||
* @beta | ||
*/ | ||
@@ -681,3 +677,2 @@ public readonly isAiming: boolean; | ||
* | ||
* @beta | ||
*/ | ||
@@ -689,3 +684,2 @@ public readonly armour: number; | ||
* | ||
* @beta | ||
*/ | ||
@@ -697,3 +691,2 @@ public readonly maxArmour: number; | ||
* | ||
* @beta | ||
*/ | ||
@@ -705,3 +698,2 @@ public readonly moveSpeed: number; | ||
* | ||
* @beta | ||
*/ | ||
@@ -713,3 +705,2 @@ public readonly aimPos: Vector3; | ||
* | ||
* @beta | ||
*/ | ||
@@ -721,3 +712,2 @@ public readonly headRot: Vector3; | ||
* | ||
* @beta | ||
*/ | ||
@@ -729,3 +719,2 @@ public readonly seat: number; | ||
* | ||
* @beta | ||
*/ | ||
@@ -737,3 +726,2 @@ public readonly entityAimingAt: Entity | null; | ||
* | ||
* @beta | ||
*/ | ||
@@ -745,3 +733,2 @@ public readonly entityAimOffset: Vector3 | null; | ||
* | ||
* @beta | ||
*/ | ||
@@ -753,3 +740,2 @@ public readonly flashlightActive: boolean; | ||
* | ||
* @beta | ||
*/ | ||
@@ -761,3 +747,2 @@ public readonly health: number; | ||
* | ||
* @beta | ||
*/ | ||
@@ -788,3 +773,3 @@ public readonly maxHealth: number; | ||
/** Vehicle gear */ | ||
public gear: number; | ||
public readonly gear: number; | ||
@@ -1258,5 +1243,2 @@ /** | ||
/** | ||
* @deprecated This property was renamed to {@link size} on the other branches than release. | ||
*/ | ||
public scale: number; | ||
@@ -1407,2 +1389,7 @@ | ||
/** | ||
* @remarks Alias for deleteAll. | ||
*/ | ||
public clear(): void; | ||
public get(key: string): any; | ||
@@ -1440,2 +1427,4 @@ | ||
public address(offset: number): bigint; | ||
public free(): boolean; | ||
@@ -1655,2 +1644,32 @@ } | ||
/** | ||
* Debug mode. | ||
* | ||
* @returns True when alt:V client is launched with debug mode enabled. | ||
*/ | ||
export function isInDebug(): boolean; | ||
/** | ||
* Returns whether voice activity input is enabled in alt:V settings. | ||
* | ||
* @returns True when voice activity input is enabled in alt:V settings. | ||
* | ||
* @deprecated Use alt.Voice.activityInputEnabled instead | ||
*/ | ||
export function isVoiceActivityInputEnabled(): boolean; | ||
/** | ||
* Returns whether the specified key is toggled. | ||
* | ||
* @param key Keycode. | ||
*/ | ||
export function isKeyToggled(key: number): boolean; | ||
/** | ||
* Determines whether the specified key is pressed. | ||
* | ||
* @param Keycode of the key. | ||
*/ | ||
export function isKeyDown(key: number): boolean; | ||
/** | ||
* Returns state of user interface and console window. | ||
@@ -1773,2 +1792,28 @@ * | ||
/** | ||
* Sets the specified config flag to the specified state. | ||
* | ||
* @param flag Config flag name. | ||
* @param state Config flag state. | ||
*/ | ||
export function setConfigFlag(flag: string, state: boolean): void; | ||
/** | ||
* Returns the state of the specified config flag. | ||
* | ||
* @param flag Config flag name. | ||
* | ||
* @returns State of the specified config flag. | ||
*/ | ||
export function getConfigFlag(flag: string): boolean; | ||
/** | ||
* Returns whether the specified config flag exists. | ||
* | ||
* @param flag Config flag name. | ||
* | ||
* @returns True when the config flag exists. | ||
*/ | ||
export function doesConfigFlagExist(flag: string): boolean; | ||
export function setCursorPos(pos: IVector2): void; | ||
@@ -1833,2 +1878,38 @@ | ||
export function toggleVoiceControls(state: boolean): void; | ||
export class WebSocketClient extends BaseObject { | ||
constructor(url: string); | ||
public on(eventName: "open", listener: () => void): void; | ||
public on(eventName: "close", listener: (code: number, reason: string) => void): void; | ||
public on(eventName: "message", listener: (message: string) => void): void; | ||
public on(eventName: "error", listener: (error: string) => void): void; | ||
public off(eventName: string, listener: (...args: any[]) => void): void; | ||
public start(): void; | ||
public stop(): void; | ||
public send(message: string | ArrayBuffer | ArrayBufferView): boolean; | ||
public addSubProtocol(protocol: string): void; | ||
public getSubProtocols(): string[]; | ||
public setExtraHeader(header: string, value: string): void; | ||
public autoReconnect: boolean; | ||
public perMessageDeflate: boolean; | ||
public pingInterval: number; | ||
public url: string; | ||
public readonly readyState: WebSocketReadyState; | ||
} | ||
} |
{ | ||
"name": "@altv/types-client", | ||
"version": "1.4.6", | ||
"version": "1.5.0", | ||
"description": "This package contains types definitions for alt:V client-side module.", | ||
@@ -5,0 +5,0 @@ "types": "index.d.ts", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
47513
1556