Retire ConstantDerivation

This commit is contained in:
Aria Minaei 2022-11-28 14:31:58 +01:00
parent ed322b66de
commit 918dd754a7
2 changed files with 0 additions and 30 deletions

View file

@ -1,29 +0,0 @@
import AbstractDerivation from './AbstractDerivation'
/**
* A derivation whose value never changes.
*/
export default class ConstantDerivation<V> extends AbstractDerivation<V> {
private readonly _v: V
/**
* @param v - The value of the derivation.
*/
constructor(v: V) {
super()
this._v = v
return this
}
/**
* @internal
*/
_recalculate() {
return this._v
}
/**
* @internal
*/
_reactToDependencyBecomingStale() {}
}

View file

@ -9,7 +9,6 @@ export {default as Atom, val, valueDerivation} from './Atom'
export {default as Box} from './Box'
export type {IBox} from './Box'
export {default as AbstractDerivation} from './derivations/AbstractDerivation'
export {default as ConstantDerivation} from './derivations/ConstantDerivation'
export {default as DerivationFromSource} from './derivations/DerivationFromSource'
export {isDerivation} from './derivations/IDerivation'
export type {IDerivation} from './derivations/IDerivation'