MCPcopy Create free account
hub / github.com/Effect-TS/effect / isBreakingChange

Function isBreakingChange

packages/tools/api-diff/src/MigrationDoc.ts:70–80  ·  view source on GitHub ↗
(change: ApiChange)

Source from the content-addressed store, hash-verified

68const compareStrings = (left: string, right: string): number => left < right ? -1 : left > right ? 1 : 0
69
70const isBreakingChange = (change: ApiChange): boolean => {
71 if (change.classification !== "parameter-added") {
72 return breakingClassifications.has(change.classification)
73 }
74 const delta = change.delta as {
75 readonly before?: ReadonlyArray<unknown>
76 readonly after?: ReadonlyArray<{ readonly optional?: boolean; readonly rest?: boolean }>
77 } | undefined
78 const beforeLength = delta?.before?.length ?? 0
79 return delta?.after?.slice(beforeLength).some((parameter) => !parameter.optional && !parameter.rest) ?? true
80}
81
82interface MigrationEntry {
83 readonly id: string

Callers

nothing calls this directly

Calls 2

someMethod · 0.80
hasMethod · 0.45

Tested by

no test coverage detected