isIdentityChangeProvider --> isIdentityDerivationProvider (#128)
This commit is contained in:
parent
b10ae71b92
commit
a4c9b8d75a
1 changed files with 2 additions and 3 deletions
|
@ -266,7 +266,7 @@ export const valueDerivation = <P extends PointerType<$IntentionalAny>>(
|
||||||
let derivation = identityDerivationWeakMap.get(meta)
|
let derivation = identityDerivationWeakMap.get(meta)
|
||||||
if (!derivation) {
|
if (!derivation) {
|
||||||
const root = meta.root
|
const root = meta.root
|
||||||
if (!isIdentityChangeProvider(root)) {
|
if (!isIdentityDerivationProvider(root)) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
`Cannot run valueDerivation() on a pointer whose root is not an IdentityChangeProvider`,
|
`Cannot run valueDerivation() on a pointer whose root is not an IdentityChangeProvider`,
|
||||||
)
|
)
|
||||||
|
@ -278,8 +278,7 @@ export const valueDerivation = <P extends PointerType<$IntentionalAny>>(
|
||||||
return derivation as $IntentionalAny
|
return derivation as $IntentionalAny
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Rename it to isIdentityDerivationProvider
|
function isIdentityDerivationProvider(
|
||||||
function isIdentityChangeProvider(
|
|
||||||
val: unknown,
|
val: unknown,
|
||||||
): val is IdentityDerivationProvider {
|
): val is IdentityDerivationProvider {
|
||||||
return (
|
return (
|
||||||
|
|
Loading…
Reference in a new issue