Skip to content

Bug with binary operators in REPL #1363

@ColonelJ

Description

@ColonelJ

Expected Behavior

It should produce a syntax error.

Actual Behavior

It seems to combine what you typed with the expression you entered previously.

Steps to reproduce the problem

$ npx ts-node
> 100 + 10
110
> * 4
140

Minimal reproduction

See above.

Specifications

  • ts-node version: v10.0.0
  • node version: v12.16.1
  • TypeScript version: v4.3.2
  • tsconfig.json, if you're using one: problem still occurs when none present
  • Operating system and version: Ubuntu 18.04.5 LTS
  • If Windows, are you using WSL or WSL2?: N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    you can do thisGood candidate for a pull request.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions