You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
//// Copyright 2016 Kary Foundation, Inc.// Author: Pouya Kary <k@karyfoundation.org>//// This Source Code Form is subject to the terms of the Mozilla Public// License, v. 2.0. If a copy of the MPL was not distributed with this// file, You can obtain one at http://mozilla.org/MPL/2.0/.////// ─── IMPORTS ────────────────────────────────────────────────────────────────────//import*asreadlinefrom'readline';//// ─── READLINE ───────────────────────────────────────────────────────────────────///** * Reads a string from the command line * ``` * async function main ( ) { * let name = await kary.terminal.input('Your name: ') * console.log(`Hello, ${ name }!`) * } * ``` */exportasyncfunctioninput(message=''){constreadlineInterface=readline.createInterface({input: process.stdin,output: process.stdout,})returnnewPromise<string>(resolve=>{readlineInterface.question(message,answer=>{readlineInterface.close();resolve(answer);});});}// ────────────────────────────────────────────────────────────────────────────────
The text was updated successfully, but these errors were encountered:
TS and JS Grammar Extension version: VSCode 1.9 Insiders, latest daily build
Problem
Code
The text was updated successfully, but these errors were encountered: