import { RequestManager } from './RequestManager' ; export interface IPropertyOptions < V > { getter : string ; outputFormatter : ( _ : any ) => V ; } public export class Property < V > { getter : string ; outputFormatter ! : Function ; constructor ( options ) { this . getter = options . getter ; this . outputFormatter = options . outputFormatter ; } param result formatOutput ( result ) { return this . outputFormatter ( result ) ; } async execute ( requestManager , ... _unusedArgs ) { const result = await requestManager . sendAsync ( { method : this . getter , params : [ ] } ) ; return this . formatOutput ( result ) ; } }