Code Monkey home page Code Monkey logo

Comments (5)

lgrammel avatar lgrammel commented on June 20, 2024

Thanks for the bug report! I'll update when I have a fix.

from js-assistant.

lgrammel avatar lgrammel commented on June 20, 2024

Hey @chandan192 - I agree that inlining here does not make sense, and you would typically not invoke it.

However, I'm not sure I understand what the issue with the refactoring is? The resulting code compiles and executes for me, and it indeed the expected result of an inline operation on temp3.

What would you expect to happen instead?

from js-assistant.

chandan192 avatar chandan192 commented on June 20, 2024

Hi @lgrammel,
I was just experimenting with the refactoring using p42 and tslint. I got the p42 refactoring suggestion on the context menu.
Inline 2 occurrences [p42]

I also checked the p42 suggestion on the activity bar but there was no suggestion. It was only on the manual context menu refactoring.

from js-assistant.

lgrammel avatar lgrammel commented on June 20, 2024

I see - in this case it was not a 'suggestion' (an in, P42 recommended), but it showed up in the quickfix menu. I'll add a warning similar to what is shown for new Objects.

from js-assistant.

lgrammel avatar lgrammel commented on June 20, 2024

I've made a couple of improvements in v1.103.1 to address this issue:

  • inline variable warns you about inlining literals that are used in multiple places
  • inline variable is only availalbe as a quickfix when it is a suggestion, otherwise you need to use the refactor or inline context menus / shortcuts

Thanks for the bug report!

from js-assistant.

Related Issues (20)

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.