facebook

Feature: quick fix "Add unimplemented members" for data

  1. CodeMix & Angular IDE
  2.  > 
  3. Webclipse 1.x Help
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #522945 Reply

    Fedor Losev
    Participant

    Suppose

    
    interface X{
      a: string;
    }
    

    For

    
    class Y implements X{  
    };
    

    There is handy quick fix “Add unimplemented members” which will add a: string to the class.

    However, in TypeScript data can be constrained to interface as well:

    
    const x: X = {  
    };
    

    There is correct error “Type ‘{}’ is not assignable to type ‘X’. Property ‘a’ is missing in type ‘{}’.”

    However, there is no quick fix.

    I understand there is some complexity because data has to contain instances and not types and it is not possible to derive what will be the value of a in that case.

    But even something rudimentary will be helpful to fill structures faster or fix after interface change, even if just filling types as for regular class or, better, some placeholder e.g. a: string_value_for_a,.

    • This topic was modified 7 years, 6 months ago by Fedor Losev.
    #522987 Reply

    support-swapna
    Moderator

    Fedor,

    I have filed an enhancement request for the dev team. Thank you for raising it.

    –Swapna
    MyEclipse Support

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Feature: quick fix "Add unimplemented members" for data

You must be logged in to post in the forum log in