Skip to content

[Feature]: Implement Value annotation #58

@jlenon7

Description

@jlenon7

🚀 Feature Proposal

Implement the @Value annotation to be used as a property decorator.

Motivation

This annotation will be responsible to automatically inject some configuration in some property of the class. Also, if the configuration value does not exist, an exception needs to be thrown.

Example

import { Value } from '@athenna/config'

export class AppService {
  @Value('app.name')
  private name: string

  @Value('app.environment')
  private environment: string

  @Value('logging.channels')
  private channels: Record<string, any>
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions