温馨提示:本站仅提供公开网络链接索引服务,不存储、不篡改任何第三方内容,所有内容版权归原作者所有
AI智能索引来源:http://www.bun.com/reference/node/readline/Interface/write
点击访问原文链接

Interface.write method | Node.js readline module | Bun

Interface.write method | Node.js readline module | BunBuildDocsReferenceGuidesBlogDiscord/node:readline/Interface/writeMwrite

Search the reference...

/

BuildDocsReferenceGuidesBlogDiscord/node:readline/Interface/writeMwrite

method

readline.Interface.writewrite(data: string | BufferArrayBufferLike>,key?: Key): void;

The rl.write() method will write either data or a key sequence identified by key to the output. The key argument is supported only if output is a TTY text terminal. See TTY keybindings for a list of key combinations.

If key is specified, data is ignored.

When called, rl.write() will resume the input stream if it has been paused.

If the Interface was created with output set to null or undefined the data and key are not written.

rl.write('Delete this!');
// Simulate Ctrl+U to delete the line written previously
rl.write(null, { ctrl: true, name: 'u' });

The rl.write() method will write the data to the readline Interface's input as if it were provided by the user.

write(data: undefined | null | string | BufferArrayBufferLike>,key: Key): void;

The rl.write() method will write either data or a key sequence identified by key to the output. The key argument is supported only if output is a TTY text terminal. See TTY keybindings for a list of key combinations.

If key is specified, data is ignored.

When called, rl.write() will resume the input stream if it has been paused.

If the Interface was created with output set to null or undefined the data and key are not written.

rl.write('Delete this!');
// Simulate Ctrl+U to delete the line written previously
rl.write(null, { ctrl: true, name: 'u' });

The rl.write() method will write the data to the readline Interface's input as if it were provided by the user.

Referenced typesinterface Keyctrl?: booleanmeta?: booleanname?: stringsequence?: stringshift?: boolean

Resources

ReferenceDocsGuidesDiscordMerch StoreGitHubBlog 

Toolkit

RuntimePackage managerTest runnerBundlerPackage runner

Project

Bun 1.0Bun 1.1Bun 1.2Bun 1.3RoadmapContributingLicense

Baked with ❤️ in San Francisco

We're hiring →

Interface.write method | Node.js readline module | Bun,AI智能索引,全网链接索引,智能导航,网页索引

    API documentation for method node:readline.Interface.write | Bun