From f54e4d96c5810c8e1dd4a25b5c9c4545c66ab812 Mon Sep 17 00:00:00 2001 From: Miguel Matey Sanz Date: Thu, 5 May 2022 09:19:42 +0200 Subject: [PATCH] fix re-exports --- demo/app/home/device-list/device-list-page.ts | 4 ++-- src/collection/index.ts | 10 ++++++++-- src/node/index.ts | 5 ++++- src/sensors/index.ts | 2 +- 4 files changed, 15 insertions(+), 6 deletions(-) diff --git a/demo/app/home/device-list/device-list-page.ts b/demo/app/home/device-list/device-list-page.ts index 28414cb..6eda10c 100644 --- a/demo/app/home/device-list/device-list-page.ts +++ b/demo/app/home/device-list/device-list-page.ts @@ -1,7 +1,7 @@ import { Frame, ItemEventData, NavigatedData, Page } from "@nativescript/core"; import { DeviceListViewModel } from "~/home/device-list/device-list-view-model"; -import { Node } from "nativescript-wearos-sensors/internal/node"; -import { fromString } from "nativescript-wearos-sensors/internal/sensors/sensor-type"; +import { Node } from "nativescript-wearos-sensors/node"; +import { fromString } from "nativescript-wearos-sensors/sensors"; export function onNavigatingTo(args: NavigatedData) { const page = args.object; diff --git a/src/collection/index.ts b/src/collection/index.ts index a0641a8..c0bdc12 100644 --- a/src/collection/index.ts +++ b/src/collection/index.ts @@ -1,2 +1,8 @@ -export { CollectorManager, PrepareError } from "../internal/collection/collector-manager"; -export { CollectionConfiguration, SensorDelay } from "../internal/collection/collection-configuration"; +import { CollectorManager as CM, PrepareError as PE } from "../internal/collection/collector-manager"; +export type CollectorManager = CM; +export type PrepareError = PE; + +import { CollectionConfiguration as CC } from "../internal/collection/collection-configuration"; +export type CollectionConfiguration = CC; + +export { SensorDelay } from "../internal/collection/collection-configuration"; \ No newline at end of file diff --git a/src/node/index.ts b/src/node/index.ts index 52f7d6a..25a2a40 100644 --- a/src/node/index.ts +++ b/src/node/index.ts @@ -1,3 +1,6 @@ export { Node } from "../internal/node"; -export { NodeDiscoverer, NodeDiscovered } from "../internal/node/discoverer/node-discoverer"; +import { NodeDiscoverer as NDR, NodeDiscovered as NDD } from "../internal/node/discoverer/node-discoverer"; +export type NodeDiscoverer = NDR; +export type NodeDiscovered = NDD; + export { getNodeDiscoverer } from "../internal/node/discoverer"; diff --git a/src/sensors/index.ts b/src/sensors/index.ts index 6337241..6a72edb 100644 --- a/src/sensors/index.ts +++ b/src/sensors/index.ts @@ -1,2 +1,2 @@ export { getSensorCollector } from "../internal/sensors"; -export { SensorType } from "../internal/sensors/sensor-type"; +export { SensorType, fromString } from "../internal/sensors/sensor-type";