intro + shared types

rilaxik 2024-06-14 17:36:27 +00:00
parent a5eb4f0039
commit 945f3ed130

35
Docs.md

@ -1 +1,34 @@
Welcome to the Wiki.
> RageFW and it's documentation is still in early development and may contain come unclear explanations. It you find any of those please open an issue and describe you problem or any improvemenets you want to see
RageFW distibutes under a list of packages:
- ``rage-fw-server``
- ``rage-fw-client``
- ``rage-fw-cef``
- ``rage-fw-shared-types``
These are setup as-should if you are using our CLI, if you still want to setup yourself, please refer to [example](https://git.entityseven.com/entityseven/rage-framework-example)
## Shared types
Core element of type-safety in our framework system. It allows you to manually type any **custom** events you have in your server system.
There are three interfaces, which share between the system to apply types:
- ``RageFW_ICustomClientEvent``
- ``RageFW_ICustomServerEvent``
- ``RageFW_ICustomCefEvent``
To apply types for events we use the following system and below is a sample how it applies them your code
```ts
customEventName(arg1: string, arg2: number): boolean
```
```ts
register('customEventName', (arg1 /*string*/, arg2 /*number*/) => {
// your logic
return true /*boolean*/
})
```
## Server
## Client
## CEF