MCPcopy Create free account
hub / github.com/hydro-dev/Hydro / useReadline

Function useReadline

packages/hydrooj/src/ui.ts:53–56  ·  view source on GitHub ↗
(callback: (str: string) => any)

Source from the content-addressed store, hash-verified

51});
52
53export const useReadline = (callback: (str: string) => any) => {
54 if (readlineCallback) throw new Error('Already waiting for input.');
55 readlineCallback = callback;
56};
57export const readline = () => new Promise<string>((resolve) => { useReadline(resolve); });

Callers 1

readlineFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected