Skip to content

Commit eaaf6d4

Browse files
committed
Export all missing types from public API
1 parent 494e4ad commit eaaf6d4

File tree

3 files changed

+30
-11
lines changed

3 files changed

+30
-11
lines changed

src/RosLib.ts

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@
66
export const REVISION = import.meta.env.VITE_ROSLIBJS_VERSION;
77

88
// Core exports
9-
export { default as Ros } from "./core/Ros.js";
9+
export { default as Ros, type TypeDefDict } from "./core/Ros.js";
1010
export { default as Topic } from "./core/Topic.js";
1111
export { default as Param } from "./core/Param.js";
1212
export { default as Service } from "./core/Service.js";
1313
export { default as Action } from "./core/Action.js";
14+
export { type GoalStatus } from "./core/GoalStatus.js";
1415

1516
// Core Transport exports
1617
export {
@@ -53,10 +54,28 @@ export {
5354
default as UrdfVisual,
5455
type UrdfGeometryLike,
5556
} from "./urdf/UrdfVisual.js";
57+
export { default as UrdfJoint } from "./urdf/UrdfJoint.js";
5658

5759
export {
5860
UrdfAttrs,
5961
UrdfType,
6062
type UrdfDefaultOptions,
6163
} from "./urdf/UrdfTypes.js";
6264
export { isElement, parseUrdfOrigin } from "./urdf/UrdfUtils.js";
65+
66+
// only export the types that typedoc requires us to export - those are our public interfaces
67+
export { type actionlib_msgs } from "./types/actionlib_msgs.js";
68+
export { type tf2_web_republisher } from "./types/tf2_web_republisher.js";
69+
export { type rosapi } from "./types/rosapi.js";
70+
export { type std_msgs } from "./types/std_msgs.js";
71+
export { type tf2_msgs } from "./types/tf2_msgs.js";
72+
export { type geometry_msgs } from "./types/geometry_msgs.js";
73+
export type { Nullable, PartialNullable } from "./types/interface-types.js";
74+
export {
75+
type RosbridgeMessage,
76+
isRosbridgeMessage,
77+
type RosbridgeAdvertiseMessage,
78+
isRosbridgeAdvertiseMessage,
79+
type RosbridgeSubscribeMessage,
80+
isRosbridgeSubscribeMessage,
81+
} from "./types/protocol.js";

src/core/Ros.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ import type {
3333
} from "./transport/Transport.js";
3434
import { WebSocketTransportFactory } from "./transport/WebSocketTransportFactory.ts";
3535

36-
interface TypeDefDict {
36+
export interface TypeDefDict {
3737
[key: string]: string | string[] | TypeDefDict | TypeDefDict[];
3838
}
3939

src/types/rosapi.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@ export namespace rosapi {
3030
name: string;
3131
default?: string;
3232
}
33-
interface GetParamResponsePreJazzy {
33+
export interface GetParamResponsePreJazzy {
3434
value: string;
3535
}
36-
interface GetParamResponseFailedPostJazzy {
36+
export interface GetParamResponseFailedPostJazzy {
3737
value: never;
3838
successful: false;
3939
reason: string;
4040
}
41-
interface GetParamResponseSuccessPostJazzy {
41+
export interface GetParamResponseSuccessPostJazzy {
4242
value: string;
4343
successful: true;
4444
reason: never;
@@ -51,12 +51,12 @@ export namespace rosapi {
5151
name: string;
5252
value: string;
5353
}
54-
type SetParamResponsePreJazzy = Record<never, never>;
55-
interface FailedSetParamResponsePostJazzy {
54+
export type SetParamResponsePreJazzy = Record<never, never>;
55+
export interface FailedSetParamResponsePostJazzy {
5656
successful: false;
5757
reason: string;
5858
}
59-
interface SuccessfulSetParamResponsePostJazzy {
59+
export interface SuccessfulSetParamResponsePostJazzy {
6060
successful: true;
6161
reason: never;
6262
}
@@ -67,12 +67,12 @@ export namespace rosapi {
6767
export interface DeleteParamRequest {
6868
name: string;
6969
}
70-
type DeleteParamResponsePreJazzy = Record<never, never>;
71-
interface FailedDeleteParamResponsePostJazzy {
70+
export type DeleteParamResponsePreJazzy = Record<never, never>;
71+
export interface FailedDeleteParamResponsePostJazzy {
7272
successful: false;
7373
reason: string;
7474
}
75-
interface SuccessfulDeleteParamResponsePostJazzy {
75+
export interface SuccessfulDeleteParamResponsePostJazzy {
7676
successful: true;
7777
reason: never;
7878
}

0 commit comments

Comments
 (0)