Skip to content

Commit 16e13fa

Browse files
refactor: export Resolver interface (#43)
1 parent 1e1c19a commit 16e13fa

4 files changed

Lines changed: 24 additions & 9 deletions

File tree

node/thing-model/package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node/thing-model/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@thingweb/thing-model",
3-
"version": "1.0.1",
3+
"version": "1.0.2",
44
"repository": {
55
"type": "git",
66
"url": "git+https://github.com/eclipse-thingweb/td-tools.git",
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/********************************************************************************
2+
* Copyright (c) 2022 Contributors to the Eclipse Foundation
3+
*
4+
* See the NOTICE file(s) distributed with this work for additional
5+
* information regarding copyright ownership.
6+
*
7+
* This program and the accompanying materials are made available under the
8+
* terms of the Eclipse Public License v. 2.0 which is available at
9+
* http://www.eclipse.org/legal/epl-2.0, or the W3C Software Notice and
10+
* Document License (2015-05-13) which is available at
11+
* https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document.
12+
*
13+
* SPDX-License-Identifier: EPL-2.0 OR W3C-20150513
14+
********************************************************************************/
15+
16+
export interface Resolver {
17+
fetch(uri: string): Promise<unknown>;
18+
}

node/thing-model/src/tm-helpers.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,9 @@ import { JsonPlaceholderReplacer } from "json-placeholder-replacer";
2222
import { LinkElement } from "wot-thing-description-types";
2323
import { DataSchema, ExposedThingInit } from "wot-typescript-definitions";
2424
import { ThingModel } from "wot-thing-model-types";
25+
import { Resolver } from "./resolver-interface";
2526
import TMSchema from "wot-thing-model-types/schema/tm-json-schema-validation.json";
2627

27-
interface Resolver {
28-
fetch(uri: string): Promise<unknown>;
29-
}
30-
3128
// TODO: Refactor and reuse debug solution from core package
3229
import debug from "debug";
3330
const namespace = "node-wot:td-tools:thing-model-helpers";

0 commit comments

Comments
 (0)