Skip to content

Commit

Permalink
Merge pull request #206 from dolanmiu/master
Browse files Browse the repository at this point in the history
Turned on type script definitions
  • Loading branch information
chenguoguo authored Sep 3, 2017
2 parents 14e24f3 + abb4421 commit e3456da
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
1 change: 0 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ snowboydetect.py
/node_modules

/lib/node/*.ts
/lib/node/*.d.ts

.npmignore
.travis.yml
6 changes: 3 additions & 3 deletions lib/node/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ enum ModelType {
UMDL
}

interface HotwordModel {
export interface HotwordModel {
file: string;
sensitivity?: string;
hotwords: string | Array<string>;
Expand All @@ -29,14 +29,14 @@ interface HotwordModelsInterface {
numHotwords(): number;
}

interface DetectorOptions {
export interface DetectorOptions {
resource: string;
models: HotwordModels;
audioGain?: number;
applyFrontend?: boolean;
}

interface SnowboyDetectInterface {
export interface SnowboyDetectInterface {
reset(): boolean;
runDetection(buffer: Buffer): number;
setSensitivity(sensitivity: string): void;
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "1.2.0",
"description": "Snowboy is a customizable hotword detection engine",
"main": "lib/node/index.js",
"typings": "lib/node/index.d.ts",
"binary": {
"module_name": "snowboy",
"module_path": "./lib/node/binding/{configuration}/{node_abi}-{platform}-{arch}/",
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"jsx": "react",
"experimentalDecorators": false,
"emitDecoratorMetadata": false,
"declaration": false,
"declaration": true,
"noImplicitAny": true,
"noImplicitUseStrict": false,
"noFallthroughCasesInSwitch": true,
Expand Down

0 comments on commit e3456da

Please sign in to comment.