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 onlyreadonly SemanticAspect[]Axes to disregard. Defaults to
['names', 'declOrder']. Pass[]to compare identifier spelling and declaration order too.transformsoptionalread onlyreadonly EmitPlugin[]Plugins declared as intentionally applied to
b. Pass the same plugin array your production emit call uses, for example[inline(), ...obfuscate()]. Each plugin’stransformIRis applied toain order, and every diff line the applied transform accounts for moves out of the four buckets intoClassifiedSemanticDiff.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