Class Worker
Package: @altmp/altv-types
Syntax
Constructors
|
Improve this Doc
View Source
Worker(string)
Declaration
Worker(filePath: string): Worker
Parameters
Type |
Name |
Description |
string |
filePath |
|
Properties
|
Improve this Doc
View Source
maxWorkers
Declaration
public readonly static maxWorkers: number
Property Value
|
Improve this Doc
View Source
valid
Declaration
public readonly valid: boolean
Property Value
|
Improve this Doc
View Source
filePath
Declaration
public readonly filePath: string
Property Value
|
Improve this Doc
View Source
isPaused
Declaration
public readonly isPaused: boolean
Property Value
Methods
|
Improve this Doc
View Source
addSharedArrayBuffer(SharedArrayBuffer)
Declaration
public static addSharedArrayBuffer(buffer: SharedArrayBuffer): number
Parameters
Type |
Name |
Description |
SharedArrayBuffer |
buffer |
|
Returns
|
Improve this Doc
View Source
removeSharedArrayBuffer(number)
Declaration
public static removeSharedArrayBuffer(id: number): void
Parameters
Type |
Name |
Description |
number |
id |
|
|
Improve this Doc
View Source
start()
Declaration
|
Improve this Doc
View Source
destroy()
Declaration
|
Improve this Doc
View Source
emit(string, any[])
Declaration
public emit(eventName: string, ...args: any[]): void
Parameters
Type |
Name |
Description |
string |
eventName |
|
any[] |
args |
|
|
Improve this Doc
View Source
on(string, (...args: any[]) => void)
Declaration
public on(eventName: string, callback: (...args: any[]) => void): void
Parameters
Type |
Name |
Description |
string |
eventName |
|
(...args: any[]) => void |
callback |
|
|
Improve this Doc
View Source
once(string, (...args: any[]) => void)
Declaration
public once(eventName: string, callback: (...args: any[]) => void): void
Parameters
Type |
Name |
Description |
string |
eventName |
|
(...args: any[]) => void |
callback |
|
|
Improve this Doc
View Source
pause()
Declaration
|
Improve this Doc
View Source
resume()
Declaration
|
Improve this Doc
View Source
off(string, (...args: any[]) => void)
Declaration
public off(eventName: string, listener: (...args: any[]) => void): void
Parameters
Type |
Name |
Description |
string |
eventName |
|
(...args: any[]) => void |
listener |
|