final lint fix and README update

This commit is contained in:
Troy Weber
2017-03-20 16:10:03 -07:00
parent 5654bc8343
commit c3feed55f6
2 changed files with 3 additions and 7 deletions
+1 -1
View File
@@ -20,7 +20,6 @@ declare class Board extends NodeJS.EventEmitter
constructor(serialPort: string, callback?: (error: any) => void)
MODES: Board.PinModes;
STEPPER: Board.StepperConstants;
// tslint:disable-next-line interface-name
I2C_MODES: Board.I2cModes;
SERIAL_MODES: Board.SerialModes;
SERIAL_PORT_IDs: Board.SerialPortIds;
@@ -147,6 +146,7 @@ declare namespace Board
DIRECTION: { CCW: STEPPER_DIRECTION, CW: STEPPER_DIRECTION }
}
// tslint:disable-next-line interface-name
export interface I2cModes
{
WRITE: I2C_MODE, READ: I2C_MODE, CONTINUOUS_READ: I2C_MODE, STOP_READING: I2C_MODE
+2 -6
View File
@@ -16,13 +16,9 @@ You will find that `const enums` are exported under the namespace `Board` for ea
use with other libraries before any boards are actually instantiated.
It's also important to note that if you want to extend the `Board` class in typescript, the
following will work (as long as you turn on `--noImplicitUseStrict` when compiling); here's
an example:
following will work:
```typescript
// store as script.ts and compile with `tsc --noImplicitUseStrict script.ts`
// then run `node script.js`
import * as Board from 'firmata'
let portString = 'port string';
@@ -38,7 +34,7 @@ class MyBoard extends Board
}
}
let myBoard:MyBoard = new MyBoard(portString, () =>
let myBoard: MyBoard = new MyBoard(portString, () =>
{
console.log('extended board ready');
myBoard.Disconnect();