VSCode Implement Method Shortcut

后端 未结 5 1907
暗喜
暗喜 2021-01-01 12:21

I\'m using VSCode, Exist, a way to implement the methods that are within an interface in typescript using some shortcut keys or set for it.

I searched on the website

相关标签:
5条回答
  • 2021-01-01 13:01

    There isn't such a shortcut by default.

    You can search for an extension on the marketplace. I didn't find any.

    0 讨论(0)
  • 2021-01-01 13:04

    Update: The shortcut in VsCode for accessing this quick action is the usual one: Ctrl + . (period).

    The built-in functionality of VsCode implementing an interface was first resolved for me by upgrading and using the Visual Studio Code -Insiders version instead.

    See: VsCode Insiders for downloading this edition of VsCode.

    Note that using the insiders editions might impact other aspects of your apps, as the versions are more beta than the public VsCode editions.

    0 讨论(0)
  • 2021-01-01 13:06

    It will be "ctrl+." for visual studio code linux version or click on the light bulb icon().

    0 讨论(0)
  • 2021-01-01 13:11

    If you are using mac, the shortcut is CMD + .

    0 讨论(0)
  • 2021-01-01 13:20

    UPDATE: VS Code now supports this functionality out of the box. Just add the interface, the compiler will highlight the controller with red, right click on the light bulb on the left and click implement interface. Enjoy!

    0 讨论(0)
提交回复
热议问题