Skip to content

Commit

Permalink
Merge pull request #1332 from danielpeintner/issue-1331
Browse files Browse the repository at this point in the history
refactor: Use interface for WoT.consume()
  • Loading branch information
relu91 authored Nov 11, 2024
2 parents 8b55ead + bf9084c commit d6d25d3
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
7 changes: 4 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/binding-file/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"types": "dist/file.d.ts",
"dependencies": {
"@node-wot/core": "0.8.17",
"rxjs": "^5.5.11"
"rxjs": "5.5.11"
},
"scripts": {
"build": "tsc -b",
Expand Down
2 changes: 1 addition & 1 deletion packages/binding-mbus/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"dependencies": {
"@node-wot/core": "0.8.17",
"node-mbus": "^2.2.4",
"rxjs": "^5.5.11"
"rxjs": "5.5.11"
},
"scripts": {
"build": "tsc -b",
Expand Down
2 changes: 1 addition & 1 deletion packages/binding-netconf/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@node-wot/core": "0.8.17",
"case-1.5.3": "npm:case@^1.5.3",
"node-netconf": "^1.1.2",
"rxjs": "^5.5.11",
"rxjs": "5.5.11",
"url-parse": "^1.5.8"
},
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/wot-impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { inspect } from "util";
const { debug } = createLoggers("core", "wot-impl");

class ThingDiscoveryProcess implements WoT.ThingDiscoveryProcess {
constructor(private directory: ConsumedThing, public filter?: WoT.ThingFilter) {
constructor(private directory: WoT.ConsumedThing, public filter?: WoT.ThingFilter) {
this.filter = filter;
this.done = false;
}
Expand Down Expand Up @@ -101,7 +101,7 @@ export default class WoTImpl {
}

/** @inheritDoc */
async consume(td: WoT.ThingDescription): Promise<ConsumedThing> {
async consume(td: WoT.ThingDescription): Promise<WoT.ConsumedThing> {
try {
const thing = parseTD(JSON.stringify(td), true);
const newThing: ConsumedThing = new ConsumedThing(this.srv, thing as ThingModel);
Expand Down

0 comments on commit d6d25d3

Please sign in to comment.