How to use the @tsed/core.Metadata.getOwn function in @tsed/core

To help you get started, we’ve selected a few @tsed/core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github TypedProject / ts-express-decorators / packages / common / src / mvc / registries / EndpointRegistry.ts View on Github external
static get(target: Type, method: string | symbol): EndpointMetadata {
    if (!this.has(target, method)) {
      const endpoint = new EndpointMetadata(target, method);
      this.getOwnEndpoints(target).push(endpoint);
      Metadata.set("endpoints", endpoint, target, method);
    }

    return Metadata.getOwn("endpoints", target, method);
  }
github TypedProject / ts-express-decorators / packages / common / src / mvc / registries / EndpointRegistry.ts View on Github external
static getOwnEndpoints(target: Type) {
    if (!this.hasEndpoints(target)) {
      Metadata.set("endpoints", [], target);
    }

    return Metadata.getOwn("endpoints", target);
  }
github TypedProject / ts-express-decorators / src / common / config / class / ServerSettingsProvider.ts View on Github external
static getMetadata(target: any) {
    return Metadata.getOwn(SERVER_SETTINGS, target);
  }