@nestia/sdk
Version:
Nestia SDK and Swagger generator
13 lines (12 loc) • 704 B
TypeScript
import { IOperationMetadata } from "../structures/IOperationMetadata";
/**
* Carries the compile-time operation metadata the SDK / Swagger / e2e
* generators read through `Reflect.getMetadata("nestia/OperationMetadata")`.
*
* The `@nestia/sdk` native transform injects this decorator as a synthesized
* AST node, so its argument is a single JSON string literal rather than an
* object literal — keeping the constructed node tree minimal. The string is
* parsed once here at module-evaluation time. A pre-parsed `IOperationMetadata`
* object is still accepted for hand-written or test usage.
*/
export declare function OperationMetadata(metadata: IOperationMetadata | string): MethodDecorator;