fix(typescript): Refactor types and interfaces to use consistent I prefix and update related tests
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
import * as plugins from '../../plugins.js';
|
||||
import { ForwardingHandler } from './base-handler.js';
|
||||
import type { ForwardConfig } from '../config/forwarding-types.js';
|
||||
import type { IForwardConfig } from '../config/forwarding-types.js';
|
||||
import { ForwardingHandlerEvents } from '../config/forwarding-types.js';
|
||||
|
||||
/**
|
||||
@ -11,14 +11,23 @@ export class HttpForwardingHandler extends ForwardingHandler {
|
||||
* Create a new HTTP forwarding handler
|
||||
* @param config The forwarding configuration
|
||||
*/
|
||||
constructor(config: ForwardConfig) {
|
||||
constructor(config: IForwardConfig) {
|
||||
super(config);
|
||||
|
||||
|
||||
// Validate that this is an HTTP-only configuration
|
||||
if (config.type !== 'http-only') {
|
||||
throw new Error(`Invalid configuration type for HttpForwardingHandler: ${config.type}`);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize the handler
|
||||
* HTTP handler doesn't need special initialization
|
||||
*/
|
||||
public async initialize(): Promise<void> {
|
||||
// Basic initialization from parent class
|
||||
await super.initialize();
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle a raw socket connection
|
||||
|
Reference in New Issue
Block a user