diff --git a/.gitignore b/.gitignore
index b25c15b..7950ebc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,5 @@
*~
+
+# IDEA project files
+*.iml
+.idea
diff --git a/index.d.ts b/index.d.ts
new file mode 100644
index 0000000..3a925ff
--- /dev/null
+++ b/index.d.ts
@@ -0,0 +1,15 @@
+///
+///
+
+import * as stream from 'stream';
+import * as webSocket from 'ws';
+
+declare class WebSocketJSONStream extends stream.Duplex {
+ constructor(ws: webSocket);
+
+ ws: webSocket;
+}
+
+declare namespace WebSocketJSONStream {}
+
+export = WebSocketJSONStream;
diff --git a/package.json b/package.json
index f37c087..4edad70 100644
--- a/package.json
+++ b/package.json
@@ -3,14 +3,25 @@
"version": "0.0.3",
"description": "Expose WebSockets with JSON as an object stream",
"main": "index.js",
+ "types": "index.d.ts",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
- "keywords": ["websockets", "websocket", "ws", "stream", "streams"],
+ "keywords": [
+ "websockets",
+ "websocket",
+ "ws",
+ "stream",
+ "streams"
+ ],
"author": "Avital Oliver ",
"repository": {
"type": "git",
"url": "git://github.com/avital/websocket-json-stream.git"
},
- "license": "MIT"
+ "license": "MIT",
+ "dependencies": {
+ "@types/node": "*",
+ "@types/ws": "*"
+ }
}