From 82d23dedf12b2e03774d09838fc74452fd0cf146 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Tue, 7 Jun 2022 12:15:35 +0300 Subject: [PATCH] builtin: add flush_stdout and flush_stderr to builtin.js.v, for feature parity with builtin.c.v --- vlib/builtin/js/builtin.js.v | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/vlib/builtin/js/builtin.js.v b/vlib/builtin/js/builtin.js.v index 71e40f4c59..5feef9b72a 100644 --- a/vlib/builtin/js/builtin.js.v +++ b/vlib/builtin/js/builtin.js.v @@ -14,6 +14,14 @@ $if js_freestanding { #globalPrint = globalThis.print } +pub fn flush_stdout() { + // needed for parity with builtin.c.v +} + +pub fn flush_stderr() { + // needed for parity with builtin.c.v +} + pub fn println(s string) { $if js_freestanding { #globalPrint(s.str)