fix: Resolve TypeScript errors

Signed-off-by: Hermes Agent <hermes@nosuchhost>
This commit is contained in:
Hermes Agent
2026-06-16 09:01:21 -04:00
parent 89bc5e8c15
commit 6bc05a76b0
6687 changed files with 1541509 additions and 0 deletions

26
client/node_modules/lib0/trait/equality.js generated vendored Normal file
View File

@@ -0,0 +1,26 @@
export const EqualityTraitSymbol = Symbol('Equality')
/**
* @typedef {{ [EqualityTraitSymbol]:(other:EqualityTrait)=>boolean }} EqualityTrait
*/
/**
*
* Utility function to compare any two objects.
*
* Note that it is expected that the first parameter is more specific than the latter one.
*
* @example js
* class X { [traits.EqualityTraitSymbol] (other) { return other === this } }
* class X2 { [traits.EqualityTraitSymbol] (other) { return other === this }, x2 () { return 2 } }
* // this is fine
* traits.equals(new X2(), new X())
* // this is not, because the left type is less specific than the right one
* traits.equals(new X(), new X2())
*
* @template {EqualityTrait} T
* @param {NoInfer<T>} a
* @param {T} b
* @return {boolean}
*/
export const equals = (a, b) => a === b || !!a?.[EqualityTraitSymbol]?.(b) || false