# EndpointRegistry Class

Module
import { EndpointRegistry } from "@tsed/common"
Source/packages/common/src/mvc/registries/EndpointRegistry.ts

# Overview

class EndpointRegistry {
    static getOwnEndpoints(target: Type<any>): any;
    static getEndpoints(target: Type<any>): EndpointMetadata[];
    static hasEndpoints(target: Type<any>): boolean;
    static get(target: Type<any>, propertyKey: string | symbol): EndpointMetadata;
    static has(target: Type<any>, method: string | symbol): boolean;
    static useBefore(target: Type<any>, targetKey: string | symbol, args: any[]): typeof EndpointRegistry;
    static use(target: Type<any>, targetKey: string | symbol, args: any[]): typeof EndpointRegistry;
    static useAfter(target: Type<any>, targetKey: string | symbol, args: any[]): typeof EndpointRegistry;
    static store(target: any, propertyKey: string): Store;
}

# Description

Registry for all Endpoint collected on a provide.

# Members

static getOwnEndpoints(target: Type<any>): any

Return all endpoints from the given class. This method doesn't return the endpoints from the parent of the given class.


static getEndpoints(target: Type<any>): EndpointMetadata[]

Get all endpoints from a given class and his parents.


static hasEndpoints(target: Type<any>): boolean

Gets a value indicating whether the target object or its prototype chain has endpoints.


static get(target: Type<any>, propertyKey: string | symbol): EndpointMetadata

Get an endpoint.


static has(target: Type<any>, method: string | symbol): boolean

Gets a value indicating whether the target object or its prototype chain has already method registered.


static useBefore(target: Type<any>, targetKey: string | symbol, args: any[]): typeof EndpointRegistry

Append mvc in the pool (before).


static use(target: Type<any>, targetKey: string | symbol, args: any[]): typeof EndpointRegistry

Add middleware and configuration for the endpoint.


static useAfter(target: Type<any>, targetKey: string | symbol, args: any[]): typeof EndpointRegistry

Append mvc in the pool (after).


static store(target: any, propertyKey: string): Store

Store a data on store manager.