UNPKG

685 BTypeScriptView Raw
1import type { SpreadArgument, StringArgument } from '../types.js';
2/**
3 * Namespace for defining arguments using decorators.
4 */
5export declare const args: {
6 /**
7 * Define argument that accepts a string value
8 */
9 string<Type = string>(options?: Partial<Omit<StringArgument<Type>, "type">>): <Key extends string, Target extends { [K in Key]?: Type; }>(target: Target, propertyName: Key) => void;
10 /**
11 * Define argument that accepts a spread value
12 */
13 spread<Type extends unknown = string[]>(options?: Partial<Omit<SpreadArgument<Type>, "type">>): <Key extends string, Target extends { [K in Key]?: Type; }>(target: Target, propertyName: Key) => void;
14};