-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add typings, markdown lint, tape to tap (#9)
* Add typings * Switch tape to tap * Update README.md * Update package.json - add markdown lint - switch tape to tap - add dependency * Removed coverall * Update .gitignore
- Loading branch information
Showing
8 changed files
with
102 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/* eslint no-unused-vars: 0 */ | ||
/* eslint no-undef: 0 */ | ||
/* eslint space-infix-ops: 0 */ | ||
|
||
/// <reference types="node" /> | ||
|
||
import { Packet as IPacket } from 'mqtt-packet' | ||
|
||
declare namespace aedes { | ||
|
||
type AedesPacket = IPacket & { | ||
brokerId: string | ||
brokerCounter: number | ||
} | ||
|
||
function Packet(object?: AedesPacket) : aedes.AedesPacket | ||
} | ||
|
||
export = aedes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/* eslint no-unused-vars: 0 */ | ||
/* eslint no-undef: 0 */ | ||
|
||
import { Packet } from '../../packet' | ||
|
||
var p = Packet() | ||
p = Packet({ | ||
cmd: 'publish', | ||
topic: 'hello', | ||
payload: Buffer.from('world'), | ||
qos: 0, | ||
dup: false, | ||
retain: false, | ||
brokerId: 'afds8f', | ||
brokerCounter: 10 | ||
}) | ||
p = Packet({ | ||
cmd: 'pingresp', | ||
brokerId: 'ab7d9', | ||
brokerCounter: 3 | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"compilerOptions": { | ||
"module": "commonjs", | ||
"target": "es6", | ||
"noEmit": true, | ||
"strict": true | ||
}, | ||
"files": [ | ||
"./index.ts" | ||
] | ||
} |