Aurélien Richez 5 years ago
commit
3204468d71
4 changed files with 41 additions and 0 deletions
  1. 3 0
      .gitignore
  2. 18 0
      package.json
  3. 7 0
      src/index.ts
  4. 13 0
      tsconfig.json

+ 3 - 0
.gitignore

@@ -0,0 +1,3 @@
+package-lock.json
+lib
+node_modules

+ 18 - 0
package.json

@@ -0,0 +1,18 @@
+{
+  "name": "stream-helper",
+  "version": "1.0.0",
+  "description": "",
+  "lib": "index/index.js",
+  "scripts": {
+    "test": "echo \"Error: no test specified\" && exit 1",
+    "build": "npm run clean && tsc && tsc -p tsconfig.json",
+    "clean": "rimraf lib"
+  },
+  "author": "",
+  "license": "MPL-2.0",
+  "dependencies": {},
+  "devDependencies": {
+    "@types/node": "^12.12.38",
+    "rimraf": "^3.0.2"
+  }
+}

+ 7 - 0
src/index.ts

@@ -0,0 +1,7 @@
+
+interface Source<T> {
+  map<V>(mapper: (t: T) => V): Source<V>
+  runWith<M>(sink: Sink<T, M>): Promise<T>
+}
+
+interface Sink<T, M> {}

+ 13 - 0
tsconfig.json

@@ -0,0 +1,13 @@
+{
+  "compilerOptions": {
+    "target": "es5",
+    "module": "commonjs",
+    "outDir": "./lib",
+    "declaration": true,
+    "moduleResolution": "node",
+    "strict": true,
+    "esModuleInterop": true,
+    "lib": ["es6"]
+  },
+  "include": ["./src/**/*"]
+}