feat: exit() accepts result value, waitUntilExit resolves with it
Change exit(error?: Error) to exit(errorOrResult?: unknown). When an
Error is passed, waitUntilExit rejects; otherwise it resolves with the
value. This matches Ink's behavior where exit("hello") resolves the
promise with "hello".
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -31,7 +31,7 @@ export interface RenderResult {
|
||||
};
|
||||
terminal: Terminal;
|
||||
unmount(this: void): void;
|
||||
waitUntilExit(this: void): Promise<void>;
|
||||
waitUntilExit(this: void): Promise<unknown>;
|
||||
}
|
||||
|
||||
function trimFrame(raw: string): string {
|
||||
|
||||
Reference in New Issue
Block a user