Shared
universal console methods for better compatibility using FiveM platform features
Fatal
- Used for crucial error handling that fatals the runtime, good for safe approaches
fatal(...parameters: any[]): voidParameters
- parameters: the parameters to log
Examples
import { info, trace, fatal } from '@trippler/tr_lib/shared'
/* Info: Hello World */
info('Hello World')
/*
Trace: Hello World
at Console.trace (citizen:/scripting/v8/console.js:297:19)
at trace (@tr_kit/build/server.js:24:15)
at @tr_kit/build/server.js:124:1
*/
trace('Hello World')
/*
Error loading script build/server.js in resource tr_kit: Error: Hello World
stack:
Error: Hello World
at fatal (@tr_kit/build/server.js:30:13)
at @tr_kit/build/server.js:126:1
*/
fatal('Hello World')