diff --git a/client/index.d.ts b/client/index.d.ts index 95d7d3fc..211e4aa2 100644 --- a/client/index.d.ts +++ b/client/index.d.ts @@ -614,7 +614,7 @@ declare module "alt-client" { } /** @beta */ - export class VirtualEntity extends WorldObject { + export class VirtualEntity extends shared.WorldObject { /** Creates a new Virtual Entity */ public constructor(group: VirtualEntityGroup, position: shared.Vector3, streamingDistance: number, data?: Record); @@ -784,23 +784,7 @@ declare module "alt-client" { public entity: WorldObject; } - export class WorldObject extends BaseObject { - /** - * Object position - */ - public pos: shared.Vector3; - - /** - * Object dimension. - * - * @remarks Check https://docs.altv.mp/articles/dimensions.html to understand how it works. - * - * @beta - */ - public dimension: number; - } - - export class Checkpoint extends WorldObject { + export class Checkpoint extends shared.WorldObject { public checkpointType: shared.CheckpointType; public nextPos: shared.Vector3; public radius: number; @@ -868,7 +852,7 @@ declare module "alt-client" { public setMeta(key: K, value: shared.InterfaceValueByKey): void; } - export class Entity extends WorldObject { + export class Entity extends shared.WorldObject { /** * Array with all entities. * @@ -2249,7 +2233,7 @@ declare module "alt-client" { public off(eventName: string, listener: (...args: any[]) => void): void; } - export class Blip extends WorldObject { + export class Blip extends shared.WorldObject { /** * Array with all blips. * @@ -4137,7 +4121,7 @@ declare module "alt-client" { } /** @beta */ - export class Marker extends WorldObject { + export class Marker extends shared.WorldObject { public constructor(type: shared.MarkerType, position: shared.Vector3, color: shared.RGBA, useStreaming?: boolean, streamingDistance?: number); /** @@ -4178,7 +4162,7 @@ declare module "alt-client" { } /** @beta */ - export class Colshape extends WorldObject { + export class Colshape extends shared.WorldObject { public static readonly all: readonly Colshape[]; public readonly colshapeType: shared.ColShapeType; @@ -4257,7 +4241,7 @@ declare module "alt-client" { } /** @beta */ - export class TextLabel extends WorldObject { + export class TextLabel extends shared.WorldObject { public constructor(text: string, fontName: string, fontSize: number, scale: number, pos: shared.IVector3, rot: shared.IVector3, color: shared.RGBA, outlineWidth: number, outlineColor: shared.RGBA, useStreaming?: boolean, streamingDistance?: number); /** @@ -4290,7 +4274,7 @@ declare module "alt-client" { } /** @beta */ - export class LocalVehicle extends WorldObject { + export class LocalVehicle extends shared.WorldObject { public constructor(model: string | number, dimension: number, pos: shared.IVector3, rot: shared.IVector3, useStreaming?: boolean, streamingDistance?: number); /** diff --git a/server/index.d.ts b/server/index.d.ts index 853dc8f9..6257901f 100644 --- a/server/index.d.ts +++ b/server/index.d.ts @@ -713,20 +713,6 @@ declare module "alt-server" { public setSyncedMeta(key: K, value: shared.InterfaceValueByKey): void; } - export class WorldObject extends BaseObject { - /** - * Object dimension. - * - * @remarks Check https://docs.altv.mp/articles/dimensions.html to understand how it works. - */ - public dimension: number; - - /** - * Object position. - */ - public pos: shared.Vector3; - } - /** @beta */ export class VirtualEntityGroup extends BaseObject { /** Creates a new Virtual Entity Group */ @@ -740,7 +726,7 @@ declare module "alt-server" { } /** @beta */ - export class VirtualEntity extends WorldObject { + export class VirtualEntity extends shared.shared.WorldObject { /** Creates a new Virtual Entity */ public constructor(group: VirtualEntityGroup, position: shared.Vector3, streamingDistance: number, data?: Record); @@ -799,7 +785,7 @@ declare module "alt-server" { public deleteStreamSyncedMeta>(key: K): void; } - export class Entity extends WorldObject { + export class Entity extends shared.WorldObject { /** * Array with all entities. * @@ -2575,7 +2561,7 @@ declare module "alt-server" { public hasStreamSyncedMeta>(key: K): boolean; } - export class Blip extends WorldObject { + export class Blip extends shared.WorldObject { /** * Array with all blips. * @@ -2731,7 +2717,7 @@ declare module "alt-server" { constructor(entity: Entity, global: boolean); } - export class Colshape extends WorldObject { + export class Colshape extends shared.WorldObject { /** @beta */ public static readonly all: readonly Colshape[]; @@ -3357,7 +3343,7 @@ declare module "alt-server" { } /** @beta */ - export class Marker extends WorldObject { + export class Marker extends shared.WorldObject { public constructor(type: shared.MarkerType, position: shared.Vector3, color: shared.RGBA); /** diff --git a/shared/index.d.ts b/shared/index.d.ts index 55e21aef..a44606f1 100644 --- a/shared/index.d.ts +++ b/shared/index.d.ts @@ -2608,6 +2608,20 @@ declare module "alt-shared" { public readonly refCount: number; } + export class WorldObject extends BaseObject { + /** + * Object dimension. + * + * @remarks Check https://docs.altv.mp/articles/dimensions.html to understand how it works. + */ + public dimension: number; + + /** + * Object position. + */ + public pos: Vector3; + } + /** * Resource name of the executing resource. */