import { Observable } from 'rxjs'; // declare namespace Types { export type Ord = number | string | boolean | Date; export type Primitive = string | number | boolean; export type List = ArrayLike; export type StringLike = string | StringRepresentable; export type Prop = Primitive | StringRepresentable; export type Path = List; export type Struct = Obj | List; export type Pred = (v: T) => boolean; export interface Type extends Function { new (...args: any[]): T; } export interface Obj { [index: string]: T; } export interface NestedObj extends Obj> {} export interface NestedArr extends Array> {} // interface NestedStruct extends Struct> {} export interface StringRepresentable { toString(): T; } export type ObsInfo = { obs: Observable, start?: string, next?: string, done?: string }; export type Submitter = (v: any) => ObsInfo; // a function mapping objects to objects using an object of transformation functions export type ObjectMapper = (mapping: Obj) => Function; export type Fn = (...args: any[]) => T; // } // export = Types;