Skip to content

Commit c86ad8a

Browse files
authored
fix: stat report typing (#83)
1 parent fbabe34 commit c86ad8a

2 files changed

Lines changed: 18 additions & 1 deletion

File tree

src/index.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
type ServerOnLog,
88
type ServerOnLogHandler,
99
type ServerLogEvent,
10+
type ServerStatReport,
1011
type ServerStats,
1112
type ServerGetStats
1213
} from './server';
@@ -86,6 +87,13 @@ type PfMcpGetStats = ServerGetStats;
8687
*/
8788
type PfMcpStats = ServerStats;
8889

90+
/**
91+
* Statistics report about the server.
92+
*
93+
* @alias ServerStatReport
94+
*/
95+
type PfMcpStatReport = ServerStatReport;
96+
8997
/**
9098
* Main function - Programmatic and CLI entry point with optional overrides
9199
*
@@ -187,6 +195,7 @@ export {
187195
type PfMcpLogEvent,
188196
type PfMcpOnLog,
189197
type PfMcpOnLogHandler,
198+
type PfMcpStatReport,
190199
type PfMcpStats,
191200
type PfMcpGetStats,
192201
type ToolCreator,

src/server.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import { DEFAULT_OPTIONS } from './options.defaults';
2525
import { isZodRawShape, isZodSchema } from './server.schema';
2626
import { isPlainObject, timeoutFunction } from './server.helpers';
2727
import { createServerStats, type Stats } from './server.stats';
28-
import { stat } from './stats';
28+
import { stat, type StatReport } from './stats';
2929

3030
/**
3131
* A tool registered with the MCP server.
@@ -93,6 +93,13 @@ interface ServerSettings {
9393
*/
9494
type ServerStats = Stats;
9595

96+
/**
97+
* Server stats report.
98+
*
99+
* @alias StatReport
100+
*/
101+
type ServerStatReport = StatReport;
102+
96103
/**
97104
* A callback to Promise return server stats.
98105
*/
@@ -458,6 +465,7 @@ export {
458465
type ServerOnLogHandler,
459466
type ServerOptions,
460467
type ServerSettings,
468+
type ServerStatReport,
461469
type ServerStats,
462470
type ServerGetStats
463471
};

0 commit comments

Comments
 (0)