Typescript symbol inspection/assertion tools.
npm install -g @symbolism/cli
symbolism --help
Assert that the use of a function is tested in addition to the function itself. See coverage.
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.
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'
}
]
}