import { chansend } from "https://deno.land/x/denops_std@v4.1.4/function/nvim/mod.ts";
Send data to channel {id}. For a job, it writes it to the
stdin of the process. For the stdio channel |channel-stdio|,
it writes to Nvim's stdout. Returns the number of bytes
written if the write succeeded, 0 otherwise.
See |channel-bytes| for more information.
{data} may be a string, string convertible, |Blob|, or a list.
If {data} is a list, the items will be joined by newlines; any
newlines in an item will be sent as NUL. To send a final
newline, include a final empty string. Example:
:call chansend(id, ["abc", "123\n456", ""])
will send "abc123456".
chansend() writes raw data, not RPC messages. If the channel
was created with "rpc":v:true
then the channel expects RPC
messages, use |rpcnotify()| and |rpcrequest()| instead.