Skip to content

Commit

Permalink
fix(syncRef): syncRef typing issue for boolean (#3553)
Browse files Browse the repository at this point in the history
  • Loading branch information
s-montigny-desautels committed Dec 4, 2023
1 parent 17f97f6 commit acb2fe6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions packages/shared/syncRef/index.test.ts
Expand Up @@ -249,5 +249,9 @@ describe('syncRef', () => {
syncRef(refNumBoolean, ref0, {
direction: 'rtl',
})

const bool0 = ref(false)
const bool1 = ref(false)
syncRef(bool0, bool1)
})
})
2 changes: 1 addition & 1 deletion packages/shared/syncRef/index.ts
Expand Up @@ -8,7 +8,7 @@ type SpecificFieldPartial<T, K extends keyof T> = Partial<Pick<T, K>> & Omit<T,
/**
* A = B
*/
type Equal<A, B> = A extends B ? (B extends A ? true : false) : false
type Equal<A, B> = [A] extends [B] ? ([B] extends [A] ? true : false) : false

/**
* A ∩ B ≠ ∅
Expand Down

0 comments on commit acb2fe6

Please sign in to comment.