How to use the @tsed/core.getValue 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 / di / src / services / DIConfiguration.ts View on Github external
getRaw(propertyKey: string): any {
    if (["scopes"].includes(propertyKey)) {
      return {
        ...this.default.get(propertyKey),
        ...this.map.get(propertyKey)
      };
    }

    const value = getValue(propertyKey, this.map);

    if (value !== undefined) {
      return value;
    }

    return getValue(propertyKey, this.default);
  }
github TypedProject / ts-express-decorators / packages / di / src / services / DIConfiguration.ts View on Github external
      return value.replace(/\${([\w.]+)}/gi, (match, key) => getValue(key, this.map));
    }
github TypedProject / ts-express-decorators / packages / di / src / services / DIConfiguration.ts View on Github external
getRaw(propertyKey: string): any {
    if (["scopes"].includes(propertyKey)) {
      return {
        ...this.default.get(propertyKey),
        ...this.map.get(propertyKey)
      };
    }

    const value = getValue(propertyKey, this.map);

    if (value !== undefined) {
      return value;
    }

    return getValue(propertyKey, this.default);
  }
github TypedProject / ts-express-decorators / packages / common / src / di / services / SettingsService.ts View on Github external
get(propertyKey: string): T {
    return this.resolve(
      getValue(propertyKey, {
        get: (key: any) => this._map.get(key)
      })
    );
  }
github TypedProject / ts-express-decorators / packages / common / src / config / services / ServerSettingsService.ts View on Github external
get(propertyKey: string): T {
    return this.resolve(getValue(propertyKey, this.map));
  }
github TypedProject / ts-express-decorators / packages / common / src / mvc / services / ParseService.ts View on Github external
eval(expression: string, scope: any, clone: boolean = true): any {
    if (isEmpty(expression)) {
      return typeof scope === "object" && clone ? ParseService.clone(scope) : scope;
    }

    const value = getValue(expression, scope);

    return typeof value === "object" && clone ? ParseService.clone(value) : value;
  }
}