12.0.0 • Published 7 years ago
@cybernaut/types v12.0.0
@cybernaut/types
Shared TypeScript type definitions.
Installation
npm install --save @cybernaut/types
Type definitions
@cybernaut/types/lib/Implementation
export type Implementation<T> = () => Promise<T>;
@cybernaut/types/lib/Action
import {Implementation} from '@cybernaut/types/lib/Implementation';
export interface Action<T> {
readonly description: string;
readonly implementation: Implementation<T>;
}
@cybernaut/types/lib/Accessor
export type Accessor = () => Promise<any>;
@cybernaut/types/lib/Predicate
export type Predicate = (actualValue: any) => boolean;
@cybernaut/types/lib/Condition
import {Accessor} from '@cybernaut/types/lib/Accessor';
import {Predicate} from '@cybernaut/types/lib/Predicate';
export interface Condition {
readonly description: string;
readonly accessor: Accessor;
readonly predicate: Predicate;
readonly negated: boolean;
}
Built by (c) Clemens Akens. Released under the terms of the MIT License.