chore: update exported types (#192)

Fixes https://github.com/microsoft/playwright-mcp/issues/186
This commit is contained in:
Pavel Feldman
2025-04-15 16:39:52 -07:00
committed by GitHub
parent bc48600a49
commit e4331313f9
4 changed files with 105 additions and 91 deletions

View File

@@ -89,14 +89,14 @@ export function createServerWithTools(options: Options): Server {
export class ServerList {
private _servers: Server[] = [];
private _serverFactory: () => Server;
private _serverFactory: () => Promise<Server>;
constructor(serverFactory: () => Server) {
constructor(serverFactory: () => Promise<Server>) {
this._serverFactory = serverFactory;
}
async create() {
const server = this._serverFactory();
const server = await this._serverFactory();
this._servers.push(server);
return server;
}