SemanticDiffOptions
On this page

SemanticDiffOptions

Interface in Tooling

Options for semanticDiff.

import type { SemanticDiffOptions } from 'typeshade'

The signature, the description and the examples come from the compiler's own source at commit 26de7be8.

Syntax

interface SemanticDiffOptions {
readonly ignore?: readonly SemanticAspect[];
readonly transforms?: readonly EmitPlugin[];
}

Instance properties

ignoreoptionalread only readonly SemanticAspect[]

Axes to disregard. Defaults to ['names', 'declOrder']. Pass [] to compare identifier spelling and declaration order too.

transformsoptionalread only readonly EmitPlugin[]

Plugins declared as intentionally applied to b. Pass the same plugin array your production emit call uses, for example [inline(), ...obfuscate()]. Each plugin’s transformIR is applied to a in order, and every diff line the applied transform accounts for moves out of the four buckets into ClassifiedSemanticDiff.explained, attributed to that plugin. Differences no declared transform explains stay in the buckets, so a regression cannot hide behind a declaration. Text-stage plugins (minify, aliasTypes, prune) contribute nothing here, because the comparison never sees emitted text.

See also

Source

src/core/semantic-diff.ts, line 63, at commit 26de7be8

Edit this page Report a problem