MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / lifecycleFamily

Function lifecycleFamily

__tests__/dynamic-boundaries.test.ts:409–421  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

407 // the base — announcing it put "runtime dispatch to 2706 types implementing
408 // Disposable" at the top of every answer whose query said "extension".
409 const lifecycleFamily = () => {
410 const names = ['Editor', 'Terminal', 'Search', 'Debug', 'Scm', 'Chat', 'Notebook', 'Output', 'Tasks', 'Remote'];
411 return [
412 'export abstract class Disposable { dispose(): void {} }',
413 ...names.map((nm, i) => [
414 `export class ${nm}Service extends Disposable {`,
415 ` get extension(): string { return '${nm.toLowerCase()}'; }`,
416 ` dispose(): void { super.dispose(); }`,
417 ` describe${nm}() { return this.extension + ${i}; }`,
418 '}',
419 ].join('\n')),
420 ].join('\n');
421 };
422
423 it('stays SILENT for a shared name the common base never declares', async () => {
424 await setup({ 'services.ts': lifecycleFamily() }, ['**/*.ts']);

Callers 1

Calls 2

mapMethod · 0.80
joinMethod · 0.45

Tested by

no test coverage detected