# All files / domains/arg index.ts

66.67% Statements 12/18
62.5% Branches 5/8
66.67% Functions 2/3
68.75% Lines 11/16

Press n or j to go to the next uncovered block, b, p or k for the previous block.

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    1420x

    20x
    20x
    20x
    20x
    20x
     import { argRegistry } from './registry';
    export { compileFieldArgs } from './compiler';
    import { ArgOptions, defaultArgOptions } from './options';

    export function Arg(options: ArgOptions = {}): ParameterDecorator {
      return (target: Object, fieldName: string, argIndex: number) => {
        const compiledOptions = {
          ...defaultArgOptions,
          ...options,
        }
        argRegistry.set(target.constructor, [fieldName, argIndex], compiledOptions);
      };
    }