@gta5urban/types-server 2.2.0 → 2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +65 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1893,6 +1893,64 @@ declare interface SyncMp {
|
|
|
1893
1893
|
rate: number;
|
|
1894
1894
|
}
|
|
1895
1895
|
|
|
1896
|
+
|
|
1897
|
+
/**
|
|
1898
|
+
* CommandsMp interfaces
|
|
1899
|
+
*/
|
|
1900
|
+
|
|
1901
|
+
declare interface CommandsMpInterface {
|
|
1902
|
+
name: string;
|
|
1903
|
+
aliases?: string[];
|
|
1904
|
+
args?: CommandsMpArgs[];
|
|
1905
|
+
adminLevel?: number;
|
|
1906
|
+
cooldown?: number;
|
|
1907
|
+
}
|
|
1908
|
+
|
|
1909
|
+
declare type CommandsMpArgType = {
|
|
1910
|
+
string: string;
|
|
1911
|
+
number: number;
|
|
1912
|
+
player: PlayerMp;
|
|
1913
|
+
};
|
|
1914
|
+
|
|
1915
|
+
declare interface CommandsMpArgDefinition<K extends keyof CommandsMpArgType = keyof CommandsMpArgType> {
|
|
1916
|
+
name: string;
|
|
1917
|
+
type: K;
|
|
1918
|
+
optional?: boolean;
|
|
1919
|
+
rest?: boolean;
|
|
1920
|
+
}
|
|
1921
|
+
|
|
1922
|
+
declare interface CommandsMpOptions<
|
|
1923
|
+
T extends readonly CommandsMpArgDefinition[] = readonly CommandsMpArgDefinition[]
|
|
1924
|
+
> {
|
|
1925
|
+
name: string;
|
|
1926
|
+
aliases?: string[];
|
|
1927
|
+
args?: T;
|
|
1928
|
+
adminLevel?: number;
|
|
1929
|
+
cooldown?: number;
|
|
1930
|
+
|
|
1931
|
+
execute: (
|
|
1932
|
+
player: PlayerMp,
|
|
1933
|
+
args: {
|
|
1934
|
+
[P in T[number] as P["name"]]: CommandsMpArgType[P["type"]];
|
|
1935
|
+
}
|
|
1936
|
+
) => void;
|
|
1937
|
+
}
|
|
1938
|
+
|
|
1939
|
+
declare interface CommandsMpArgs<K extends keyof CommandsMpArgType = keyof CommandsMpArgType> {
|
|
1940
|
+
name: string;
|
|
1941
|
+
type: K;
|
|
1942
|
+
optional?: boolean;
|
|
1943
|
+
rest?: boolean;
|
|
1944
|
+
}
|
|
1945
|
+
|
|
1946
|
+
declare interface CommandsMp {
|
|
1947
|
+
add: <T extends CommandsMpArgs[]>(command: CommandsMpOptions<T>) => void;
|
|
1948
|
+
execute: (player: PlayerMp, raw: string) => void;
|
|
1949
|
+
commands: Map<string, CommandsMpOptions & { lastUse: Map<number, number> }>;
|
|
1950
|
+
getCommands: (player: PlayerMp) => CommandsMpInterface[];
|
|
1951
|
+
}
|
|
1952
|
+
|
|
1953
|
+
|
|
1896
1954
|
declare interface Mp {
|
|
1897
1955
|
Player: typeof PlayerMp;
|
|
1898
1956
|
players: PlayerMpPool;
|
|
@@ -1934,7 +1992,13 @@ declare interface Mp {
|
|
|
1934
1992
|
joaat(str: string): number;
|
|
1935
1993
|
joaat(strs: string[]): number[];
|
|
1936
1994
|
|
|
1937
|
-
|
|
1995
|
+
|
|
1996
|
+
/**
|
|
1997
|
+
* custom command entities
|
|
1998
|
+
*/
|
|
1999
|
+
|
|
2000
|
+
commands: CommandsMp;
|
|
2001
|
+
|
|
1938
2002
|
}
|
|
1939
2003
|
|
|
1940
2004
|
declare const mp: Mp;
|