This is a release aimed specifically at FiveM developers utilizing the V8 ScRT (JS/TS). These are non-framework dependent wrappers & functions that provide either extra type safety in the case of TypeScript or are generally helpful when used in JavaScript.
Further documentation and NPM instructions can be found on the GitHub repository, I recommend going there if you have any interest at all of following this project.
Current Features
- Promisfied Net Events - Allows for emitting events on the client as a promise and handling on the server to resolve that promise (No more complaining about callbacks!).
- Basic RPC System - Allows for registering client side RPC listeners that can be called from the server, returning data back to it.
- NUI Proxy system that allows for NUI to fetch server side data and resolve back to the original HTTP request.
- TypeScript first with declarations generated from source (JavaScript is still compatible)
- General wrappers to make development easier within the runtime
- Some TypeScript wrapped natives allowing for more fluid static typing through generics.
- An experimental architecture for handling promise events on the server (request object, response object), resembling the design of popular web servers like
Express
Current Status
This project is in a very experimental phase, do not expect for API’s to remain the same after community feedback and testing has been provided.
As a result, documentation is currently very WIP as well. Expect more documentation with explicit examples to arrive as development continues and API’s solidify
Feedback
If you use this package please try and provide feedback regarding developer experience and API. Best place for that would be on GitHub
Important Note
This is an npm package not a standalone resource. If you don’t know what you are doing with npm, this isn’t for you.