我创建了一个TypeScript文件,通过将ts文件拖到HTML中,Visual Studio在我的HTML文件中添加了引用。
现在,尽管ts文件有类型信息,但HTML中的Intellisense不提供这些信息。
如何从HTML文件中引用的ts文件中生成Intellisense提示类型信息?
发布于 2018-08-17 09:25:12
您可以按照本MSDN中所述为HTML Editor Intellisense编写JSDoc。
https://msdn.microsoft.com/en-us/library/mt162307.aspx?f=255&MSPPError=-2147217396
/** @description Determines the area of a circle that has the specified radius parameter.
* @param {number} radius The radius of the circle.
* @return {number}
*/
function getArea(radius) {
var areaVal;
areaVal = Math.PI * radius * radius;
return areaVal;
}
https://stackoverflow.com/questions/51759334
复制相似问题