import ko , { PureComputed , Observable } from "knockout" ; export type ReadonlyObservable < T > = { getter : PureComputed < T > ; value : Observable < T > ; } ; const util = { readonlyObservable < T > ( value ) { const obs = ko . observable ( value ) ; return { getter : ko . pureComputed ( ( ) => obs ( ) ) , value : obs } ; } } ; export default util ;