Typescript 내에서 XML 설명서를 이미 지원 하는가?
-
12-12-2019 - |
문제
Typescript 내에서 XML 문서를 이미 지원합니까?그것은 거기에있는 것 같지만 어쩌면 나는 뭔가를 내려다 보는 것입니다.
다음과 같은 것을 원해요 :
export class Point {
/// <summary>This is a Point class.</summary>
constructor (public x: number, public y: number) {
/// <summary>Creates a new Point object</summary>
/// <param name="x"></param>
/// <param name="y"></param>
}
}
. 해결책
언어 사양에 대한 언급은 없으므로 현재이 기능에 대한 지원이 없습니다.
사용중인 유일한 댓글 구문은 소스 파일에 종속성을 만드는 것입니다.
/// <reference path="..."/>
.
프로젝트 페이지 에서이 기능을 제안 할 수 있습니다 - 따라서 미래에 언어에 추가 될 수 있습니다.아이디어는 견인력을 얻습니다.
다른 팁
가치가있는 것을 위해 Microsoft의 샘플에는이 스타일의 설명이 포함됩니다.시차 샘플에서 :
constructor(scrollableContent: HTMLElement, perspective: number) {
/// <param name="scrollableContent">The container that will be parallaxed.</param>
/// <param name="perspective">The ratio of how much back content should be
/// scrolled relative to forward content. For example, if this value is
/// 0.5, and there are 2 surfaces, the front-most surface would be scrolled
/// normally, and the surface behind it would be scrolled half as much.</param>
this.perspective = perspective;
this.surface = [];
this.content = scrollableContent;
$(scrollableContent).scroll((event: JQueryEventObject) => {
this.onContainerScroll(event);
});
}
. 분명히 JSDoc이 현재 Visual Studio 코드에서 현재 사용하고 있으며 IntelliSense 팝업에서 보여줍니다.
제휴하지 않습니다 StackOverflow