Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(wasm): Add empty functions for js builds to enable WASM builds #887

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 9 additions & 0 deletions signals_js.go
@@ -0,0 +1,9 @@
//go:build js
// +build js

package tea

// listenForResize is not available in js runtime.
func (p *Program) listenForResize(done chan struct{}) {
close(done)
}
21 changes: 21 additions & 0 deletions tty_js.go
@@ -0,0 +1,21 @@
//go:build js
// +build js

package tea

import (
"errors"
"os"
)

func (p *Program) initInput() error {
return nil
}

func (p *Program) restoreInput() error {
return nil
}

func openInputTTY() (*os.File, error) {
return nil, errors.New("unavailable in js")
}