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

Function addMatch

packages/tools/api-diff/src/Diff.ts:405–420  ·  view source on GitHub ↗
(
    baseEntity: ApiEntity | undefined,
    headEntity: ApiEntity | undefined,
    details: Omit<Match, "base" | "head">
  )

Source from the content-addressed store, hash-verified

403 const suggestedMatches: Array<Match> = []
404
405 const addMatch = (
406 baseEntity: ApiEntity | undefined,
407 headEntity: ApiEntity | undefined,
408 details: Omit<Match, "base" | "head">
409 ): boolean => {
410 if (
411 baseEntity === undefined || headEntity === undefined ||
412 !unmatchedBase.has(baseEntity.id) || !unmatchedHead.has(headEntity.id)
413 ) {
414 return false
415 }
416 unmatchedBase.delete(baseEntity.id)
417 unmatchedHead.delete(headEntity.id)
418 matches.push({ base: baseEntity, head: headEntity, ...details })
419 return true
420 }
421
422 for (const baseEntity of unmatchedBase.values()) {
423 addMatch(baseEntity, unmatchedHead.get(baseEntity.id), {

Callers 1

diffSnapshotsFunction · 0.85

Calls 2

pushMethod · 0.80
hasMethod · 0.45

Tested by

no test coverage detected