UNPKG

ofx4js

Version:

A javascript OFX library, ported from OFX4J

38 lines (37 loc) 1.12 kB
/** * convenience function to supply a default value if the given value is not specified */ export declare function _default<T>(value: T, defaultValue: T): T; export declare function isAssignableFrom(entryType: any, assignableTo: any): boolean; /** * a function called on an object instance that will return the desired property value */ export interface ReadMethod<Type> { (): Type; } /** * a function called on an object instance that will set the desired property value */ export interface WriteMethod<Type> { (value: Type): void; } /** * parameters used to create a PropertyDescriptor */ export interface PropertyDescriptorParams<T> { type: any; read: ReadMethod<T>; write: WriteMethod<T>; } /** * an interface to read and write a value into an object */ export declare abstract class PropertyDescriptor { private propertyType; private readMethod; private writeMethod; constructor(params: PropertyDescriptorParams<any>); getPropertyType(): any; getReadMethod(): ReadMethod<any>; getWriteMethod(): WriteMethod<any>; }