Comparing version 1.4.0 to 1.5.0
@@ -30,2 +30,3 @@ Copyright Statement for Contributions to the Callbag Standard | ||
devanshj | Devansh Jethmalani, jethmalani.devansh@gmail.com | ||
niieani | Bazyli Brzoska, bazyli.brzoska@gmail.com | ||
{ | ||
"name": "callbag", | ||
"version": "1.4.0", | ||
"version": "1.5.0", | ||
"description": "A standard for JS callbacks", | ||
@@ -23,4 +23,4 @@ "repository": { | ||
"ts-node": "^4.1.0", | ||
"typescript": "^2.6.2" | ||
"typescript": "^4.3.5" | ||
} | ||
} | ||
} |
@@ -50,3 +50,3 @@ # Callbag 👜 | ||
After the handshake, the source MAY terminate the sink. Alternatively, the sink MAY terminate the source after the handshake has occurred. If the source terminates the sink, then the sink SHOULD NOT terminate the source, and vice-versa. In other words, termination SHOULD NOT be mutual. | ||
After the handshake, the source MAY terminate the sink. Alternatively, the sink MAY terminate the source after the handshake has occurred. If the source terminates the sink, then the sink SHOULD NOT terminate the source, and vice-versa. In other words, termination SHOULD NOT be mutual. A callbag MUST NOT be terminated more than once. | ||
@@ -53,0 +53,0 @@ **Data delivery** `(type: 1, data: any) => void` |
@@ -12,2 +12,14 @@ export type START = 0; | ||
export type CallbagArgs<I, O> = | ||
// handshake: | ||
| [type: START, talkback: Callbag<O, I>] | ||
// data from source: | ||
| [type: DATA, data: I] | ||
// pull request: | ||
| [type: DATA] | ||
// error: | ||
| [type: END, error: unknown] | ||
// end without error: | ||
| [type: END, _?: undefined] | ||
/** | ||
@@ -18,5 +30,3 @@ * A Callbag dynamically receives input of type I | ||
export interface Callbag<I, O> { | ||
(t: START, d: Callbag<O, I>): void; | ||
(t: DATA, d: I): void; | ||
(t: END, d?: any): void; | ||
(...args: CallbagArgs<I, O>): void | ||
} | ||
@@ -23,0 +33,0 @@ |
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
24926
45