Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@altv/types-client

Package Overview
Dependencies
Maintainers
1
Versions
212
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@altv/types-client - npm Package Compare versions

Comparing version 1.5.6 to 1.6.0

188

index.d.ts

@@ -181,2 +181,3 @@ declare module "alt-client" {

render: () => void;
[name: string]: (...args: any[]) => void;
}

@@ -212,3 +213,3 @@

brakeForce: number;
camberStiffnesss: number;
camberStiffness: number;
centreOfMassOffset: Vector3;

@@ -303,2 +304,8 @@ clutchChangeRateScaleDownShift: number;

export interface IHttpResponse {
readonly statusCode: number;
readonly body: string;
readonly headers: Record<string, string>;
}
/**

@@ -559,2 +566,11 @@ * Resource name of the executing resource.

/**
* Returns whether the entity is spawned in the game world.
*
* @remarks This does the same thing as checking if the {@link scriptID} is 0.
*
* @alpha
*/
public readonly isSpawned: boolean;
/** Hash of entity model */

@@ -626,2 +642,9 @@ public readonly model: number;

/**
* Array with all streamed in players
*
* @alpha
*/
public static readonly streamedIn: Array<Player>;
/** Local player */

@@ -781,2 +804,9 @@ public static readonly local: Player;

/**
* Array with all streamed in vehicles
*
* @alpha
*/
public static readonly streamedIn: Array<Vehicle>;
/** Vehicle gear */

@@ -1220,2 +1250,10 @@ public readonly gear: number;

/**
* Subscribes to WebView event with specified listener, which only triggers once.
*
* @param eventName Name of the event.
* @param listener Listener that should be added.
*/
public once(eventName: string, listener: (...args: any[]) => void): void;
/**
* Focuses the webview so it can be interacted with.

@@ -1229,2 +1267,12 @@ */

public unfocus(): void;
/**
* Gets all the listeners for the specified webview event.
*
* @param eventName Name of the event.
* @returns Array of listener functions for that event.
*
* @alpha
*/
public getEventListeners(eventName: string | null): Function[];
}

@@ -1786,2 +1834,3 @@

* @returns True when the alt:V client is launched with debug mode enabled.
* @deprecated In dev branch, use {@link debug}.
*/

@@ -1860,5 +1909,6 @@ export function isInDebug(): boolean;

/**
* Unsubscribes from client event with specified listener.
* Unsubscribes from a client event with the specified listener.
*
* @remarks Listener should be of the same reference as when event was subscribed.
* @remarks Listener should be of the same reference as when event was subscribed to.
*
* @param eventName Name of the event.

@@ -1870,5 +1920,6 @@ * @param listener Listener that should be removed.

/**
* Unsubscribes from server event with specified listener.
* Unsubscribes from a server event with the specified listener.
*
* @remarks Listener should be of the same reference as when event was subscribed.
* @remarks Listener should be of the same reference as when event was subscribed to.
*
* @param eventName Name of the event.

@@ -1880,3 +1931,3 @@ * @param listener Listener that should be removed.

/**
* Subscribes to client event with specified listener.
* Subscribes to a client event with the specified listener.
*

@@ -1889,11 +1940,15 @@ * @param eventName Name of the event.

/**
* Subscribes to client event with specified listener, which only triggers once.
* Subscribes to all client events with the specified listener.
*
* @remarks Listener will be only called for user-created events.
*
* @param eventName Name of the event.
* @param listener Listener that should be added.
*
* @alpha
*/
export function once<K extends keyof IClientEvent>(eventName: K, listener: IClientEvent[K]): void;
export function on(listener: (eventName: string, ...args: any[]) => void): void;
/**
* Subscribes to client event with specified listener.
* Subscribes to a client event with the specified listener, which only triggers once.
*

@@ -1903,14 +1958,18 @@ * @param eventName Name of the event.

*/
export function on<S extends string>(event: Exclude<S, keyof IClientEvent>, listener: (...args: any[]) => void | Promise<void>): void;
export function once<K extends keyof IClientEvent>(eventName: K, listener: IClientEvent[K]): void;
/**
* Subscribes to client event with specified listener, which only triggers once.
* Subscribes to all client events with the specified listener, which only triggers once.
*
* @remarks Listener will be only called for user-created events.
*
* @param eventName Name of the event.
* @param listener Listener that should be added.
*
* @alpha
*/
export function once<S extends string>(event: Exclude<S, keyof IClientEvent>, listener: (...args: any[]) => void | Promise<void>): void;
export function once(listener: (eventName: string, ...args: any[]) => void): void;
/**
* Subscribes to server event with specified listener.
* Subscribes to a server event with the specified listener.
*

@@ -1923,10 +1982,34 @@ * @param eventName Name of the event.

/**
* Subscribes to server event with specified listener, which only triggers once.
* Subscribes to all server events with the specified listener.
*
* @remarks Listener will be only called for user-created events.
*
* @param eventName Name of the event.
* @param listener Listener that should be added.
*
* @alpha
*/
export function onServer(listener: (eventName: string, ...args: any[]) => void): void;
/**
* Subscribes to a server event with the specified listener, which only triggers once.
*
* @param eventName Name of the event.
* @param listener Listener that should be added.
*/
export function onceServer(eventName: string, listener: (...args: any[]) => void): void;
/**
* Subscribes to all server events with the specified listener, which only triggers once.
*
* @remarks Listener will be only called for user-created events.
*
* @param eventName Name of the event.
* @param listener Listener that should be added.
*
* @alpha
*/
export function onceServer(listener: (eventName: string, ...args: any[]) => void): void;
/**
* Removes the specified GXT entry.

@@ -2153,2 +2236,12 @@ *

public setExtraHeader(header: string, value: string): void;
/**
* Gets all the listeners for the specified websocket event.
*
* @param eventName Name of the event.
* @returns Array of listener functions for that event.
*
* @alpha
*/
public getEventListeners(eventName: string | null): Function[];
}

@@ -2203,2 +2296,69 @@

export function hasResource(name: string): boolean;
/**
* Gets all the listeners for the specified local event.
*
* @param eventName Name of the event or null for generic event.
* @returns Array of listener functions for that event.
*
* @alpha
*/
export function getEventListeners(eventName: string | null): Function[];
/**
* Gets all the listeners for the specified remote event.
*
* @param eventName Name of the event or null for generic event.
* @returns Array of listener functions for that event.
*
* @alpha
*/
export function getRemoteEventListeners(eventName: string | null): Function[];
/** @alpha */
export class HttpClient extends BaseObject {
public constructor();
public setExtraHeader(header: string, value: string): void;
public getExtraHeaders(): Record<string, string>;
public get(url: string): IHttpResponse;
public head(url: string): IHttpResponse;
public post(url: string, body: string): IHttpResponse;
public put(url: string, body: string): IHttpResponse;
public delete(url: string, body: string): IHttpResponse;
public connect(url: string, body: string): IHttpResponse;
public options(url: string, body: string): IHttpResponse;
public trace(url: string, body: string): IHttpResponse;
public patch(url: string, body: string): IHttpResponse;
}
/**
* Gets the Base64 encoded string of the headshot with the specified ID.
*
* @remarks The headshot ID is returned by the `registerPedheadshot3`, `registerPedheadshotTransparent` or `registerPedheadshot` native.
* @param id ID of the headshot.
* @returns The Base64 string of the headshot image.
*
* @alpha
*/
export function getHeadshotBase64(id: number): string;
/**
* Returns if alt:V is in debug mode.
*
* @returns True when the alt:V client is launched with debug mode enabled.
*
* @alpha
*/
export const debug: boolean;
}

2

package.json
{
"name": "@altv/types-client",
"version": "1.5.6",
"version": "1.6.0",
"description": "This package contains types definitions for alt:V client-side module.",

@@ -5,0 +5,0 @@ "types": "index.d.ts",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc