@mdf.js/core
Version:
MMS - API Core - Common types, classes and functions
19 lines • 1.02 kB
TypeScript
/**
* Copyright 2024 Mytra Control S.L. All rights reserved.
*
* Use of this source code is governed by an MIT-style license that can be found in the LICENSE file
* or at https://opensource.org/licenses/MIT.
*/
import { LoggerInstance } from '@mdf.js/logger';
import { Port } from './Port';
import { Factory, PortConfigValidationStruct } from './types';
/**
* Create a new Provider Factory based in a Port
* @param port - Port instance
* @param validation - Port config validation struct
* @param defaultName - Default name for the provider
* @param type - Provider type
* @returns Factory class, with a static `create` methods to create a provider instances
*/
export default function <PortClient, PortConfig, PortInstance extends Port<PortClient, PortConfig>>(port: new (config: PortConfig, logger: LoggerInstance) => PortInstance, validation: PortConfigValidationStruct<PortConfig>, defaultName: string, type: string): Factory<PortClient, PortConfig, PortInstance>;
//# sourceMappingURL=Factory.d.ts.map