[英]How do I get intellisense to know the structure of a JSON parameter (visual studio 2012)
這與Visual Studio Version 2012有關。請在回答時牢記這一點......
我想知道如何讓intellisense識別構造函數接受的JSON對象的結構作為參數。
說你有這樣的事情:
somethingObject = function(blueprint) {
this.target = blueprint.target;
this.propertyFromBlueprintNested = blueprint.nestedSomething.thePropertyIwant;
}
在Visual Studio中實例化一個新的somethingObject時,intellisense可以識別JSON結構在您編寫它時的方式。 考慮一下:
var s = new somethingObject({
//<< Visual studio would suggest target, or nestedSomething here
}
我願意考慮使用另一個能夠正確處理JavaScript的IDE。 我目前正在評估JetBrains WebStorm
致最重要的人:
這是我得到的:
(我會在這里放一張圖片,但我需要更多聲望:-(
最重要的是,該物業並不像你的那樣表現出來。
我想我可能需要放棄它。
Jetbrains Resharper支持此功能: 版本8 EAP (即將發布)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.