@rbxts/flamework-gateways-mod
Advanced tools
Comparing version 0.2.0 to 0.2.2
@@ -5,4 +5,6 @@ export declare const EVENTS_FOLDER = "flamework-gateways/events"; | ||
export declare const GUARDS_METADATA = "__guards__"; | ||
export declare const GUARD_METADATA = "__guard__"; | ||
export declare const PIPES_METADATA = "__pipes__"; | ||
export declare const PIPE_METADATA = "__pipe__"; | ||
export declare const IS_ON_EVENT_METADATA = "__isOnEvent__"; | ||
export declare const IS_ON_INVOKE_METADATA = "__isOnInvoke__"; |
/** | ||
* Decorator that marks a class as a Gateway guard. Used for dependency | ||
* injection only. | ||
* @example UseGuards(Dependency(MyGuard)) | ||
* @example | ||
* ```ts | ||
* const myGuard = Dependency(MyGuard); | ||
* ... | ||
* UseGuards(myGuard) | ||
* ``` | ||
*/ | ||
@@ -6,0 +11,0 @@ export declare const Guard: (...args: void[]) => ((ctor: defined) => never) & { |
/** | ||
* Decorator that marks a class as a Gateway pipe. Used for dependency | ||
* injection only. | ||
* @example UsePipes(Dependency(MyPipe)) | ||
* @example | ||
* ```ts | ||
* const myPipe = Dependency(MyPipe); | ||
* ... | ||
* UsePipes(myPipe) | ||
* ``` | ||
*/ | ||
@@ -6,0 +11,0 @@ export declare const Pipe: (...args: void[]) => ((ctor: defined) => never) & { |
import { Constructor } from "../interfaces/constructor.interface"; | ||
import { CanActivate } from "../interfaces/features/can-activate.interface"; | ||
export declare type Guard = CanActivate | Constructor<CanActivate>; | ||
/** | ||
@@ -10,4 +11,4 @@ * Decorator that binds guards to the scope of a specific method. Will be run | ||
*/ | ||
export declare const UseGuards: (...args: (CanActivate | Constructor<CanActivate, []>)[]) => ((target: defined, propertyKey: string, descriptor: defined) => never) & { | ||
export declare const UseGuards: (...args: Guard[]) => ((target: defined, propertyKey: string, descriptor: defined) => never) & { | ||
_flamework_Decorator: never; | ||
}; |
@@ -0,3 +1,5 @@ | ||
/// <reference types="compiler-types" /> | ||
import { Constructor } from "../interfaces/constructor.interface"; | ||
import { PipeTransform } from "../interfaces/features/pipe-transform.interface"; | ||
export declare type ParamPipe = PipeTransform | Constructor<PipeTransform> | Array<PipeTransform | Constructor<PipeTransform>> | undefined; | ||
/** | ||
@@ -10,4 +12,4 @@ * Decorator that binds pipes to the parameters of a method. For example, | ||
*/ | ||
export declare const UsePipes: (...args: (PipeTransform<any, any> | Constructor<PipeTransform<any, any>, []> | (PipeTransform<any, any> | Constructor<PipeTransform<any, any>, []>)[] | undefined)[]) => ((target: defined, propertyKey: string, descriptor: defined) => never) & { | ||
export declare const UsePipes: (...args: ParamPipe[]) => ((target: defined, propertyKey: string, descriptor: defined) => never) & { | ||
_flamework_Decorator: never; | ||
}; |
import { MethodDescriptor } from "@flamework/core/out/modding"; | ||
import { CanActivate } from "../interfaces/features/can-activate.interface"; | ||
import { PipeTransform } from "../interfaces/features/pipe-transform.interface"; | ||
export declare function getGuardsForMethod(descriptor: MethodDescriptor): CanActivate[]; | ||
export declare function getPipesForMethod(descriptor: MethodDescriptor): PipeTransform[][]; | ||
import { GuardResolver, PipeResolver } from "../interfaces/resolver.type"; | ||
export declare function getGuardsForMethod(descriptor: MethodDescriptor): GuardResolver[]; | ||
export declare function getPipesForMethod(descriptor: MethodDescriptor): PipeResolver[][]; |
@@ -1,1 +0,1 @@ | ||
export declare function resolveDependency(object: object): unknown; | ||
export declare function resolveDependency<T>(object: object): T | undefined; |
{ | ||
"name": "@rbxts/flamework-gateways-mod", | ||
"version": "0.2.0", | ||
"version": "0.2.2", | ||
"description": "A class-based Flamework networking mod", | ||
@@ -5,0 +5,0 @@ "main": "out/init.lua", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
74308
92
446