INNER CODE UNIT · TypeScript

Promise

openocta/openocta · ui/src/ui/app.ts:1114

    return new Promise((resolve) => {
      this.nativeResolveConfirm = resolve;
      this.nativeDialog = { kind: "confirm", message };
    });
  }

  showAlert(message: string): Promise<void> {
    return new Promise((resolve) => {
      this.nativeResolveAlert = resolve;
      this.nativeDialog = { kind: "alert", message };
    });
  }

  showPrompt(message: string, defaultValue = ""): Promise<string | null> {
    return new Promise((resolve) => {
      this.nativePromptInput = defaultValue;
      this.nativeResolvePrompt = resolve;
      this.nativeDialog = { kind: "prompt", message, defaultValue };

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…