declarative-js
Version:
_declarative-js_ is modern JavaScript library, that helps to: - tackle array transformation with built in JavaScript array api (e.g. `array.filter(toBe.unique())`), - provide a type-level solution for representing optional values instead of null referen
41 lines (40 loc) • 2.1 kB
TypeScript
export * from './src/optional/Optional';
export * from './src/array/filters';
export * from './src/array/reduce';
export * from './src/array/mappers';
export * from './src/array/sort';
export * from './src/map/JMap';
export * from './src/map/MethodMap';
export * from './src/types';
import { OptionalInterface as OptionalInterfaceType } from './src/optional/Optional';
import { Filter as FilterNs, toBe as toBeNs } from './src/array/filters';
import { Reducer as ReducerNs } from './src/array/reduce';
import { Mapper as MapperNs } from './src/array/mappers';
import { Sort as SortNs } from './src/array/sort';
import { JMapType as JMapTypeType } from './src/map/JMap';
import { Entry as EntryType, MethodMap as MethodMapType } from './src/map/MethodMap';
import { AlwaysArray as AlwaysArrayType, AutoComparable as AutoComparableType, Consumer as ConsumerType, Getter as GetterType, KeyGetter as KeyGetterType, NonNull as NonNullType, Predicate as PredicateType, StringMap as StringMapType, Tuple as TupleType } from './src/types';
export declare namespace d {
const Optional: new <T>(value?: T | undefined) => OptionalInterfaceType<T>;
const optional: <T>(value?: T | undefined) => OptionalInterfaceType<T>;
const toBe: typeof toBeNs;
const Filter: typeof FilterNs;
const Reducer: typeof ReducerNs;
const Mapper: typeof MapperNs;
const Sort: typeof SortNs;
const JMap: new <T>(init?: Record<string, T> | undefined) => MethodMapType<T>;
const Map: <T>(obj?: StringMapType<T> | undefined) => MethodMapType<T>;
type OptionalInterface<T> = OptionalInterfaceType<T>;
type JMapType<T> = JMapTypeType<T>;
type Entry<T> = EntryType<T>;
type MethodMap<T> = MethodMapType<T>;
type StringMap<T> = StringMapType<T>;
type AutoComparable = AutoComparableType;
type Getter<C, R> = GetterType<C, R>;
type KeyGetter<C> = KeyGetterType<C>;
type Predicate<T> = PredicateType<T>;
type AlwaysArray<T> = AlwaysArrayType<T>;
type NonNull<R> = NonNullType<R>;
type Tuple<E1, E2> = TupleType<E1, E2>;
type Consumer<T> = ConsumerType<T>;
}