@wesjet/function.js
Version:
wesjet javascript library
16 lines (15 loc) • 429 B
TypeScript
/**
* Copyright (c) Wesbitty, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*
*/
export declare class SingleItem<T> {
item: T;
constructor(item: T);
map<U>(fn: (item: T) => U): SingleItem<U>;
filter(fn: (item: T) => boolean): SingleItem<T | undefined>;
}
export declare const singleItem: <T>(item: T) => SingleItem<T>;