it-goodbye
Advanced tools
Comparing version 4.0.4 to 4.0.5
@@ -5,3 +5,3 @@ import type { Transform } from 'it-stream-types'; | ||
} | ||
export declare function endable(goodbye: Uint8Array): Endable<Uint8Array, Uint8Array>; | ||
export declare function endable(goodbye: Uint8Array): Endable<AsyncGenerator<Uint8Array>, AsyncGenerator<Uint8Array>>; | ||
//# sourceMappingURL=endable.d.ts.map |
@@ -26,3 +26,3 @@ /** | ||
import type { Duplex } from 'it-stream-types'; | ||
export declare function goodbye<TSinkReturn>(stream: Duplex<Uint8Array, Uint8Array, Promise<TSinkReturn>>, goodbye?: Uint8Array | string): Duplex<Uint8Array, Uint8Array, Promise<TSinkReturn>>; | ||
export declare function goodbye<TSinkReturn>(stream: Duplex<AsyncGenerator<Uint8Array>, AsyncGenerator<Uint8Array>, Promise<TSinkReturn>>, goodbye?: Uint8Array | string): Duplex<AsyncGenerator<Uint8Array>, AsyncGenerator<Uint8Array>, Promise<TSinkReturn>>; | ||
//# sourceMappingURL=index.d.ts.map |
{ | ||
"name": "it-goodbye", | ||
"version": "4.0.4", | ||
"version": "4.0.5", | ||
"description": "Add a goodbye handshake to a duplex async iterable", | ||
@@ -141,3 +141,3 @@ "author": "Alan Shaw", | ||
"dependencies": { | ||
"it-stream-types": "^1.0.3", | ||
"it-stream-types": "^2.0.1", | ||
"uint8arrays": "^5.0.1" | ||
@@ -144,0 +144,0 @@ }, |
@@ -7,4 +7,4 @@ import type { Source, Transform } from 'it-stream-types' | ||
export function endable (goodbye: Uint8Array): Endable<Uint8Array, Uint8Array> { | ||
const transform: Endable<Uint8Array, Uint8Array> = Object.assign((source: Source<Uint8Array>) => (async function * () { | ||
export function endable (goodbye: Uint8Array): Endable<AsyncGenerator<Uint8Array>, AsyncGenerator<Uint8Array>> { | ||
const transform: Endable<AsyncGenerator<Uint8Array>, AsyncGenerator<Uint8Array>> = Object.assign((source: Source<Uint8Array>) => (async function * () { | ||
yield * source | ||
@@ -11,0 +11,0 @@ yield goodbye |
@@ -31,3 +31,3 @@ /** | ||
export function goodbye <TSinkReturn> (stream: Duplex<Uint8Array, Uint8Array, Promise<TSinkReturn>>, goodbye?: Uint8Array | string): Duplex<Uint8Array, Uint8Array, Promise<TSinkReturn>> { | ||
export function goodbye <TSinkReturn> (stream: Duplex<AsyncGenerator<Uint8Array>, AsyncGenerator<Uint8Array>, Promise<TSinkReturn>>, goodbye?: Uint8Array | string): Duplex<AsyncGenerator<Uint8Array>, AsyncGenerator<Uint8Array>, Promise<TSinkReturn>> { | ||
let token: Uint8Array | ||
@@ -45,3 +45,3 @@ | ||
const output: Duplex<Uint8Array, Uint8Array, Promise<TSinkReturn>> = { | ||
const output: Duplex<AsyncGenerator<Uint8Array>, AsyncGenerator<Uint8Array>, Promise<TSinkReturn>> = { | ||
// when the source ends, | ||
@@ -48,0 +48,0 @@ // send the goodbye and then wait to receive |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
17723
+ Addedit-stream-types@2.0.2(transitive)
- Removedit-stream-types@1.0.5(transitive)
Updatedit-stream-types@^2.0.1