Retire ConstantDerivation
This commit is contained in:
parent
ed322b66de
commit
918dd754a7
2 changed files with 0 additions and 30 deletions
|
@ -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() {}
|
|
||||||
}
|
|
|
@ -9,7 +9,6 @@ export {default as Atom, val, valueDerivation} from './Atom'
|
||||||
export {default as Box} from './Box'
|
export {default as Box} from './Box'
|
||||||
export type {IBox} from './Box'
|
export type {IBox} from './Box'
|
||||||
export {default as AbstractDerivation} from './derivations/AbstractDerivation'
|
export {default as AbstractDerivation} from './derivations/AbstractDerivation'
|
||||||
export {default as ConstantDerivation} from './derivations/ConstantDerivation'
|
|
||||||
export {default as DerivationFromSource} from './derivations/DerivationFromSource'
|
export {default as DerivationFromSource} from './derivations/DerivationFromSource'
|
||||||
export {isDerivation} from './derivations/IDerivation'
|
export {isDerivation} from './derivations/IDerivation'
|
||||||
export type {IDerivation} from './derivations/IDerivation'
|
export type {IDerivation} from './derivations/IDerivation'
|
||||||
|
|
Loading…
Reference in a new issue