diff --git a/.gitignore b/.gitignore
index 84dc48e..7ad9e67 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,9 @@
node_modules
-coverage
-.nyc_output
-package-lock.json
+build
dist
+.docs
+.coverage
+node_modules
+package-lock.json
+yarn.lock
+.vscode
diff --git a/README.md b/README.md
index 8cdf14d..b469bcd 100644
--- a/README.md
+++ b/README.md
@@ -1,13 +1,15 @@
# it-pair
[![codecov](https://img.shields.io/codecov/c/github/alanshaw/it-pair.svg?style=flat-square)](https://codecov.io/gh/alanshaw/it-pair)
-[![CI](https://img.shields.io/github/workflow/status/alanshaw/it-pair/test%20&%20maybe%20release/master?style=flat-square)](https://github.com/alanshaw/it-pair/actions/workflows/js-test-and-release.yml)
+[![CI](https://img.shields.io/github/actions/workflow/status/alanshaw/it-pair/js-test-and-release.yml?branch=master\&style=flat-square)](https://github.com/alanshaw/it-pair/actions/workflows/js-test-and-release.yml?query=branch%3Amaster)
> pair a source async iterable stream and a sink async iterable stream
## Table of contents
- [Install](#install)
+ - [Browser `
+```
+
A pair of {source, sink} streams that are internally connected,
(what goes into the sink comes out the source)
@@ -76,6 +86,10 @@ pipe(
)
```
+## API Docs
+
+-
+
## License
Licensed under either of
diff --git a/package.json b/package.json
index 42a2a7b..24481ad 100644
--- a/package.json
+++ b/package.json
@@ -36,7 +36,7 @@
},
"files": [
"src",
- "dist/src",
+ "dist",
"!dist/test",
"!**/*.tsbuildinfo"
],
@@ -142,6 +142,7 @@
]
},
"scripts": {
+ "clean": "aegir clean",
"lint": "aegir lint",
"dep-check": "aegir dep-check",
"build": "aegir build",
@@ -152,10 +153,11 @@
"test:firefox-webworker": "aegir test -t webworker -- --browser firefox",
"test:node": "aegir test -t node --cov",
"test:electron-main": "aegir test -t electron-main",
- "release": "aegir release"
+ "release": "aegir release",
+ "docs": "aegir docs"
},
"dependencies": {
- "it-stream-types": "^1.0.3",
+ "it-stream-types": "^2.0.1",
"p-defer": "^4.0.0"
},
"devDependencies": {
diff --git a/src/duplex.ts b/src/duplex.ts
index 9eb6780..e34efa3 100644
--- a/src/duplex.ts
+++ b/src/duplex.ts
@@ -1,10 +1,10 @@
import { pair } from './index.js'
-import type { Duplex } from 'it-stream-types'
+import type { Duplex, Source } from 'it-stream-types'
/**
* Two duplex streams that are attached to each other
*/
-export function duplexPair (): [Duplex, Duplex] {
+export function duplexPair (): [Duplex, Source, Promise>, Duplex, Source, Promise>] {
const a = pair()
const b = pair()
return [
diff --git a/src/index.ts b/src/index.ts
index c0e0e24..1b5b5e2 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -4,7 +4,7 @@ import type { Source, Duplex } from 'it-stream-types'
/**
* A pair of streams where one drains from the other
*/
-export function pair (): Duplex {
+export function pair (): Duplex, Source, Promise> {
const deferred = defer