Skip to content

Commit

Permalink
Init
Browse files Browse the repository at this point in the history
  • Loading branch information
igor-adlab committed Jan 21, 2017
1 parent 1f8a15c commit 3ea1b9d
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
.idea
7 changes: 7 additions & 0 deletions src/Consumer.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
class Consumer {
constructor() {

}
}

export default Consumer;
6 changes: 6 additions & 0 deletions src/INatsOptions.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
interface INatsPublisherOptions {
connection: any
subscription: any
}

export { INatsPublisherOptions };
17 changes: 17 additions & 0 deletions src/Publisher.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { INatsPublisherOptions } from './INatsOptions';

class Publisher {
private connection: any;
private subscription: any;

constructor(options: INatsPublisherOptions) {
let { connection, subscription } = options;

this.subscription = subscription;
this.connection = connection;

subscription.subscribe()
}
}

export default Publisher;
3 changes: 3 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import Consumer from './Consumer';
import Publisher from './Publisher';
export { Consumer, Publisher };
8 changes: 8 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es5",
"noImplicitAny": false,
"sourceMap": false
}
}

0 comments on commit 3ea1b9d

Please sign in to comment.