@thi.ng/api
Advanced tools
Comparing version 1.1.0 to 1.1.1
23
api.d.ts
@@ -215,4 +215,7 @@ /** | ||
* Generic interface for set collection types. | ||
* | ||
* @param V value type | ||
* @param T return or container type | ||
*/ | ||
export interface ISet<T> { | ||
export interface ISet<V, T> { | ||
/** | ||
@@ -224,3 +227,3 @@ * Conjoins/adds value `x` to set and returns updated set | ||
*/ | ||
conj(x: T): boolean; | ||
conj(x: V): T; | ||
/** | ||
@@ -232,3 +235,3 @@ * Disjoins/removes value `x` from set and returns updated set | ||
*/ | ||
disj(x: T): boolean; | ||
disj(x: V): T; | ||
} | ||
@@ -238,8 +241,11 @@ /** | ||
* functionality. | ||
* | ||
* @param V value type | ||
* @param T return/container type | ||
*/ | ||
export interface IStack<S, T> { | ||
export interface IStack<V, T> { | ||
/** | ||
* Returns top-of-stack item. | ||
*/ | ||
peek(): T; | ||
peek(): V; | ||
/** | ||
@@ -250,9 +256,10 @@ * Returns collection w/ top-of-stack item removed. | ||
*/ | ||
pop(): S; | ||
push(): S; | ||
pop(): T; | ||
push(x: V): T; | ||
} | ||
export declare type Watch<T> = (id: string, oldState: T, newState: T) => void; | ||
export interface IWatch<T> { | ||
addWatch(id: string, fn: (id: string, oldState: T, newState: T) => void): any; | ||
addWatch(id: string, fn: Watch<T>): any; | ||
removeWatch(id: string): any; | ||
notifyWatches(oldState: T, newState: T): any; | ||
} |
{ | ||
"name": "@thi.ng/api", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "Common, generic types & interfaces for thi.ng projects", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
20598
676