Skip to main content

Class: Delta

Defined in: packages/core/src/domain/entities/delta.ts:24

Records the named blocks changed within a single spec by a change.

A delta is structural if it contains MODIFIED or REMOVED operations, which may affect downstream consumers of the spec and therefore require explicit approval before the change is archived.

Constructors​

Constructor​

new Delta(props): Delta

Defined in: packages/core/src/domain/entities/delta.ts:35

Creates a new Delta from the given properties.

Parameters​

props​

DeltaProps

Delta construction properties

Returns​

Delta

Accessors​

added​

Get Signature​

get added(): readonly string[]

Defined in: packages/core/src/domain/entities/delta.ts:48

Block names added to the spec.

Returns​

readonly string[]


modified​

Get Signature​

get modified(): readonly string[]

Defined in: packages/core/src/domain/entities/delta.ts:53

Block names modified in the spec.

Returns​

readonly string[]


removed​

Get Signature​

get removed(): readonly string[]

Defined in: packages/core/src/domain/entities/delta.ts:58

Block names removed from the spec.

Returns​

readonly string[]


specPath​

Get Signature​

get specPath(): SpecPath

Defined in: packages/core/src/domain/entities/delta.ts:43

The spec path this delta targets.

Returns​

SpecPath

Methods​

isEmpty()​

isEmpty(): boolean

Defined in: packages/core/src/domain/entities/delta.ts:78

Returns whether this delta has no operations at all.

Returns​

boolean

true if added, modified, and removed are all empty


isStructural()​

isStructural(): boolean

Defined in: packages/core/src/domain/entities/delta.ts:69

Returns whether this delta contains structural changes (MODIFIED or REMOVED).

Structural changes may break downstream consumers and require approval.

Returns​

boolean

true if the delta has any modified or removed blocks