BuildDocsReferenceGuidesBlogDiscordnode:readlineInterfaceM[Symbol.asyncIterator]M[events.captureRejectionSymbol]M[Symbol.dispose]MaddListenerMcloseCoconstructorPcursorMemitMeventNamesMgetCursorPosMgetMaxListenersMgetPromptPlineMlistenerCountMlistenersMoffMonMonceMpauseMprependListenerMprependOnceListenerMpromptMquestionMrawListenersMremoveAllListenersMremoveListenerMresumeMsetMaxListenersMsetPromptPterminalMwriteBuildDocsReferenceGuidesBlogDiscordnode:readlineInterfaceM[Symbol.asyncIterator]M[events.captureRejectionSymbol]M[Symbol.dispose]MaddListenerMcloseCoconstructorPcursorMemitMeventNamesMgetCursorPosMgetMaxListenersMgetPromptPlineMlistenerCountMlistenersMoffMonMonceMpauseMprependListenerMprependOnceListenerMpromptMquestionMrawListenersMremoveAllListenersMremoveListenerMresumeMsetMaxListenersMsetPromptPterminalMwritereadline.InterfaceInterfaceReadableWritablecursorlineterminal[Symbol.asyncIterator][events.captureRejectionSymbol]Error[Symbol.dispose]addListenerInterfaceEventMapInterfaceEventMapaddListenercloseemitInterfaceEventMapInterfaceEventMapemiteventNamesgetCursorPosCursorPosgetMaxListenersgetPromptlistenerCountInterfaceEventMapInterfaceEventMaplistenerCountlistenersInterfaceEventMapInterfaceEventMaplistenersoffInterfaceEventMapInterfaceEventMapoffonInterfaceEventMapInterfaceEventMapononceInterfaceEventMapInterfaceEventMaponcepauseprependListenerInterfaceEventMapInterfaceEventMapprependListenerprependOnceListenerInterfaceEventMapInterfaceEventMapprependOnceListenerpromptquestionquestionAbortablerawListenersInterfaceEventMapInterfaceEventMaprawListenersremoveAllListenersInterfaceEventMapremoveAllListenersremoveListenerInterfaceEventMapInterfaceEventMapremoveListenerresumesetMaxListenerssetPromptwriteBufferKeywriteBufferKeyReferenceDocsGuidesDiscordMerch StoreGitHubBlogRuntimePackage managerTest runnerBundlerPackage runnerBun 1.0Bun 1.1Bun 1.2Bun 1.3RoadmapContributingLicenseWe're hiring →
Node readline.Interface class | API Reference | Bun,AI智能索引,全网链接索引,智能导航,网页索引
- Instances of the `readline.Interface` class are constructed using the `readline.createInterface()` method. Every instance is associated with a
single `input` [Readable](https://nodejs.org/docs/latest-v25.x/api/stream.html#readable-streams) stream and a single `output` [Writable](https://nodejs.org/docs/latest-v25.x/api/stream.html#writable-streams) stream.
The `output` stream is used to print prompts for user input that arrives on,
and is read from, the `input` stream.