Git Product home page Git Product logo

local-ts-repl's People

Contributors

dependabot[bot] avatar jalopez avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

local-ts-repl's Issues

Request: history preservation

Great work moving this to Typescript and adding extra features! Do you think it's easy enough to add memorising command history across sessions? Often a local REPL has the same repeated commands performed over and over. I wasn't able to figure out how to integrate https://www.npmjs.com/package/repl.history into this implementation.

ts-repl 10.6.0: Property 'setupHistory' does not exist on type 'PrettyREPLServer'

> ts-repl                                                                        
/home/d9k/.nvm/versions/node/v14.16.1/lib/node_modules/ts-node/src/index.ts:840
    return new TSError(diagnosticText, diagnosticCodes);
           ^
TSError: ⨯ Unable to compile TypeScript:
node_modules/local-ts-repl/index.ts:58:12 - error TS2339: Property 'setupHistory' does not exist on type 'PrettyREPLServer'.

58   instance.setupHistory(`${os.homedir()}/.node_repl_history`, () => {});
              ~~~~~~~~~~~~

    at createTSError (/home/d9k/.nvm/versions/node/v14.16.1/lib/node_modules/ts-node/src/index.ts:840:12)
    at reportTSError (/home/d9k/.nvm/versions/node/v14.16.1/lib/node_modules/ts-node/src/index.ts:844:19)
    at getOutput (/home/d9k/.nvm/versions/node/v14.16.1/lib/node_modules/ts-node/src/index.ts:1034:36)
    at Object.compile (/home/d9k/.nvm/versions/node/v14.16.1/lib/node_modules/ts-node/src/index.ts:1342:43)
    at Module.m._compile (/home/d9k/.nvm/versions/node/v14.16.1/lib/node_modules/ts-node/src/index.ts:1474:30)
    at Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Object.require.extensions.<computed> [as .ts] (/home/d9k/.nvm/versions/node/v14.16.1/lib/node_modules/ts-node/src/index.ts:1478:12)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12) {
  diagnosticCodes: [ 2339 ]
}
> node --version
v14.16.1
> cat /home/d9k/.nvm/versions/node/v14.16.1/lib/node_modules/ts-node/package.json | grep version
  "version": "10.6.0",

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.