@merinaa/core
v0.3.0
Published
Core types, decorators and interfaces for the Merinaa FiveM framework
Maintainers
Readme
@merinaa/core
Core types, decorators, and interfaces for the Merinaa framework.
Ships the primitives every other Merinaa package depends on:
@Module, @Controller, @Injectable, @OnClient, @OnServer, @On,
@OnReady, @Guard, @Interceptor, @Pipe, parameter decorators
(@Source, @Body, @Param), RPC decorators, metadata keys, and
lifecycle interfaces.
Install
npm install @merinaa/core reflect-metadatareflect-metadata is a peer dependency — your app must import it once at
the top of its entrypoint.
Usage
import 'reflect-metadata';
import { Module, Controller, OnClient, Source } from '@merinaa/core';
@Controller()
export class PlayerController {
@OnClient('player:ping')
pong(@Source() src: number) {
return `pong to ${src}`;
}
}
@Module({
controllers: [PlayerController],
})
export class PlayerModule {}You almost never install this package directly — depend on
@merinaa/server or @merinaa/client which
re-export everything you need.
License
MIT
