@nestjs-kitchen/connextion-presto
Version:
A flexible module to provide presto-client interface in NextJS.
29 lines (28 loc) • 1.21 kB
TypeScript
import type { DynamicModule, Type } from '@nestjs/common';
import { type AsyncModuleOptions, type ConnectionOptionName, type ConnextionInstance, type ModuleOptions } from '@nestjs-kitchen/connextion';
import { DEFAULT_INSTANCE_NAME } from './constants';
import { PrestoInstance } from './presto.instance';
import type { PrestoInstanceOptions } from './types';
/**
* Creates a set of Presto services and modules.
*/
export declare const definePresto: <T extends string = typeof DEFAULT_INSTANCE_NAME>() => {
/**
* The Presto service, responsible for managing all presto connection instances registered by the module.
*/
Presto: Type<Record<ConnectionOptionName<T>, Omit<PrestoInstance, keyof ConnextionInstance<unknown>>>>;
/**
* The Presto module, used to register and create presto connection instances with options.
*
* This module can be configured using 2 static methods:
*
* - `register`
* - `registerAsync`
*
*/
PrestoModule: {
new (): {};
register(options: ModuleOptions<T, PrestoInstanceOptions>): DynamicModule;
registerAsync(options: AsyncModuleOptions<T, PrestoInstanceOptions>): DynamicModule;
};
};