@trapi/metadata
Version:
Generate REST-API metadata scheme from TypeScript Decorators.
25 lines • 853 B
TypeScript
import type { CompilerOptions } from 'typescript';
import type { Options } from '../../config';
import type { ReferenceTypes } from '../../resolver';
import type { Controller } from '../controller';
export type MetadataGeneratorContext = {
options: Options;
sourceFiles: string[];
compilerOptions?: CompilerOptions;
};
/**
* The output specification for metadata generation.
*/
export interface Metadata {
/**
* A Controller is a collection of grouped methods (GET, POST, ...)
* for a common URL path (i.e /users) or an more explicit URL path (i.e. /users/:id).
*/
controllers: Controller[];
/**
* ReferenceTypes is an object of found types (interfaces, type, ...),
* and classes which were detected during code analysis.
*/
referenceTypes: ReferenceTypes;
}
//# sourceMappingURL=type.d.ts.map