Adapting return type

This commit is contained in:
Martin Karkowski 2020-09-07 23:23:18 +02:00
parent 07ec7d5f0d
commit e67bc6de4c

View File

@ -38,6 +38,10 @@ export interface IExportPropertyToOpenAPIParameters {
readonly?: boolean
}
export interface IExportFunctionToOpenAPIParameters {
uri?: string
}
/**
* Decorator used to export a Class API over openAPI
* @param options
@ -102,21 +106,11 @@ export function exportPropertyToOpenAPI(options: IExportPropertyToOpenAPIParamet
};
}
/**
* Defintion of a Functon.
*/
export type callable<T> = {
(...args): T
}
/**
* Decorator, that will export the Function to a Dispatcher
* @param func The Function
* @param options The Options.
*/
export function exportFunctionToOpenAPI<T>(func: callable<T>, options: IExportPropertyToOpenAPIParameters) {
export function exportFunctionToOpenAPI<T>(func: T, options: IExportFunctionToOpenAPIParameters) {
return func;
}