kpdecker / symbolism

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

symbolism

Typescript symbol inspection/assertion tools.

npm install -g @symbolism/cli
symbolism --help

Function Call Coverage Report

Assert that the use of a function is tested in addition to the function itself. See coverage.

Static schema extraction

Document the schema of your typescript data types. Calculates the final schema for your data types, merged interfaces.

symbolism dumpSchema ./packages/test/src/dump-symbol.ts Schema

Output:

{
  bar: "bar" | "bat";
  merged: number;
};

For a machine JSON Schema readable format, use the --json flag.

Symbol lookup

Lookup the definition of a symbol in your project. This command is useful when setting up the configuration for our coverage and eslint tools.

defineSymbol ./packages/test/src/dump-symbol.ts 9 20

Output:

{
  type: 'string',
  symbol: [
    {
      kind: 'PropertySignature',
      name: 'search: string;',
      path: 'Location.search',
      location: 'node_modules/typescript/lib/lib.dom.d.ts:9069:5'
    }
  ]
}

About

License:MIT License


Languages

Language:TypeScript 99.8%Language:JavaScript 0.2%Language:Shell 0.1%