You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Rejects `ready` if the worker errors or the startup timeout elapses
414
-
- Terminates the worker on `dispose()`
414
+
- Terminates the worker on `dispose()` or on `{ kind: "error" }`
415
415
416
416
### `lsp.workers.createTransport(options)`
417
417
@@ -443,12 +443,20 @@ Returns a `TransportHandle`:
443
443
}
444
444
```
445
445
446
-
**Ready** (worker → main):
446
+
**Ready** (worker → main) after successful initialization:
447
447
448
448
```js
449
449
{ kind: "ready" }
450
450
```
451
451
452
+
**Error** (worker → main) if initialization fails — rejects `ready` immediately and tears down the worker:
453
+
454
+
```js
455
+
{ kind: "error", message: "Failed to initialize worker" }
456
+
```
457
+
458
+
Prefer this over throwing from the configure path. An uncaught rejection does not always surface as `Worker.onerror`, so the host would otherwise wait until `startupTimeout`.
459
+
452
460
**JSON-RPC** as strings in both directions (no LSP headers):
0 commit comments