Skip to content

Commit 240fcd1

Browse files
authored
make name public and export types for rendering (#540)
1 parent 7c9c77c commit 240fcd1

File tree

4 files changed

+12
-3
lines changed

4 files changed

+12
-3
lines changed

src/main.ts

+7-1
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,13 @@ export { GantryClient, type Gantry } from './components/gantry';
199199
*/
200200
export * as gantryApi from './gen/component/gantry/v1/gantry_pb';
201201

202-
export { MLModelClient, type MLModel } from './services/ml-model';
202+
export {
203+
MLModelClient,
204+
type MLModel,
205+
type Metadata,
206+
type TensorInfo,
207+
type FlatTensors,
208+
} from './services/ml-model';
203209

204210
export { MotorClient, type Motor } from './components/motor';
205211
/**

src/services/ml-model/client.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ import { MLModelService } from '../../gen/service/mlmodel/v1/mlmodel_connect';
1010

1111
export class MLModelClient implements MLModel {
1212
private client: PromiseClient<typeof MLModelService>;
13-
private readonly name: string;
1413
private readonly options: Options;
14+
15+
public readonly name: string;
1516
public callOptions: CallOptions = { headers: {} as Record<string, string> };
1617

1718
constructor(client: RobotClient, name: string, options: Options = {}) {

src/services/ml-model/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
export type { MLModel, FlatTensors } from './ml-model';
1+
export type { MLModel, Metadata, FlatTensors, TensorInfo } from './ml-model';
22
export { MLModelClient } from './client';

src/services/ml-model/ml-model.ts

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import type { Struct } from '@bufbuild/protobuf';
22
import type * as mlModelAPI from '../../gen/service/mlmodel/v1/mlmodel_pb';
33

4+
export type Metadata = mlModelAPI.Metadata;
5+
export type TensorInfo = mlModelAPI.TensorInfo;
46
export type FlatTensors = mlModelAPI.FlatTensors;
57

68
export interface MLModel {

0 commit comments

Comments
 (0)