Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | 1x 1x 1x 1x 11x 11x 11x 1x 1x 1x 1x 1x 1x 1x 11x 11x 11x 11x 11x 11x 1x | import {Internal, type IAdapterFactory} from '@feasibleone/blong/types';
// import {Port as UtPort} from 'ut-port';
const UtPort = () =>
class Port extends Internal {
findHandler(_: string): unknown {
return null;
}
};
export interface IPort {
new (portApi: Parameters<IAdapterFactory>[0] & {config: unknown; configBase: string}): unknown;
}
export default class Port extends Internal {
public constructor() {
super();
const result = UtPort();
const findHandler = result.prototype.findHandler;
result.prototype.findHandler = function (name: string) {
return findHandler.call(this, name.replaceAll('.', '').toLowerCase());
};
return result as unknown as Port;
}
}
|