| 68 | const compareStrings = (left: string, right: string): number => left < right ? -1 : left > right ? 1 : 0 |
| 69 | |
| 70 | const 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 | |
| 82 | interface MigrationEntry { |
| 83 | readonly id: string |