@triviality/core
Version:
Purely typed service container
14 lines (11 loc) • 431 B
text/typescript
import { FF } from '../../FeatureFactory';
import { KernelServices } from '../KernelFeature';
import { drawDependencies } from './drawDependency';
export interface DebugFeatureServices {
getDependencyTree(): string;
}
export const TextDebugFeature: FF<DebugFeatureServices, KernelServices> = function textDebugFeature({ kernel }) {
return {
getDependencyTree: () => () => drawDependencies(kernel().references()),
};
};