aboutsummaryrefslogtreecommitdiff
path: root/test/scripts/apidoc/signature.debug.ts
blob: 347b8235b0f377c1350b071fbb29004ffe109661 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/**
 * This file exists, because vitest doesn't allow me to debug code outside of src and test.
 * And it's easier to test these features independently from the main project.
 */
import { initMarkdownRenderer } from '../../../scripts/apidoc/markdown';
import { analyzeSignature } from '../../../scripts/apidoc/signature';
import { loadExampleMethods } from './utils';

/* Run with `pnpm tsx test/scripts/apidoc/signature.debug.ts` */

const methods = loadExampleMethods();

initMarkdownRenderer()
  .then(() => {
    Object.entries(methods).forEach(([name, method]) => {
      console.log('Analyzing: ', name);
      const result = analyzeSignature(method, '', method.name);
      console.log('Result: ', result);
    });
  })
  .catch(console.error);