Git Product home page Git Product logo

Comments (4)

jasonlyu123 avatar jasonlyu123 commented on September 27, 2024 2

Isn't there already a quick fix for this? Maybe it's more of a problem with a specific case where there isn't a quick fix available.

from typescript.

golopot avatar golopot commented on September 27, 2024

Isn't there already a quick fix for this? Maybe it's more of a problem with a specific case where there isn't a quick fix available.

Indeed! The quick fix is available for function argument, but not for variable declaration:

Have quick fix:

function f(a : T) {}
f({})

No quick fix:

const t: T = {};

from typescript.

jasonlyu123 avatar jasonlyu123 commented on September 27, 2024

Could you provide a playground link for the case? Simple type does seem to work in both parameter and variable declaration. So it might have something to do with the type differences.

from typescript.

golopot avatar golopot commented on September 27, 2024

My bad, I didn't notice the quick fix on the variable name. I thought a code action would be offered on the object literal part. An improvement might be to offer a quick fix or code action when cursor is on the object literal part. I don't know if this is feasible. Feel free to close the issue.

from typescript.

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.