chore: update exported types (#192)
Fixes https://github.com/microsoft/playwright-mcp/issues/186
This commit is contained in:
parent
bc48600a49
commit
e4331313f9
4 changed files with 105 additions and 91 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue