JSDoc
발표일 | 1999년(25년 전)(1999) |
---|---|
최신 버전 | 3.6.3 (2019년 7월 15일(4년 전)(2019-07-15)) |
포맷 종류 | 프로그래밍 문서화 포맷 |
다음에 포함 | 자바스크립트 소스 파일 |
다음으로부터 확장 | JavaDoc |
웹사이트 | jsdoc |
JSDoc은 자바스크립트 소스 코드 파일들에 주해를 달기 위해 사용하는 마크업 언어이다. JSDoc을 포함하는 주석을 사용하는 프로그래머들은 자신들이 작성하는 코드의 API를 설명하는 설명 문서를 추가할 수 있다. 그 뒤 다양한 도구들에 의해 처리되어 HTML과 리치 텍스트 포맷 등의 접근 가능한 포맷으로 문서가 생성된다. JSDoc 사양은 CC BY-SA-3.0으로 배포되며, 이와 동반되는 문서 생성기와 파서 라이브러리는 아파치 라이선스 2.0으로 배포되는 자유 소프트웨어이다.
예시
/** @class Circle representing a circle. */ class Circle { /** * Creates an instance of Circle. * * @author: moi * @param {number} r The desired radius of the circle. */ constructor(r) { /** @private */ this.radius = r /** @private */ this.circumference = 2 * Math.PI * r } /** * Creates a new Circle from a diameter. * * @param {number} d The desired diameter of the circle. * @return {Circle} The new Circle object. */ static fromDiameter(d) { return new Circle(d / 2) } /** * Calculates the circumference of the Circle. * * @deprecated since 1.1.0; use getCircumference instead * @return {number} The circumference of the circle. */ calculateCircumference() { return 2 * Math.PI * this.radius } /** * Returns the pre-computed circumference of the Circle. * * @return {number} The circumference of the circle. * @since 1.1.0 */ getCircumference() { return this.circumference } /** * Find a String representation of the Circle. * * @override * @return {string} Human-readable representation of this Circle. */ toString() { return `[A Circle object with radius of ${this.radius}.]` } } /** * Prints a circle. * * @param {Circle} circle */ function printCircle(circle) { /** @this {Circle} */ function bound() { console.log(this) } bound.apply(circle) }
같이 보기
외부 링크
- Official JSDoc Website, for tutorials and docs on usage
- Official JSDoc Github, for up-to-date code
- "Annotating JavaScript for the Closure Compiler", Closure Tools documentation, Google Developer website
- v
- t
- e
- ESLint
- JSHint
- JSLint
- Ajax
- 클라이언트 사이드
- DHTML
- 자바스크립트 라이브러리
- 자바스크립트 문법
- 겸손한 자바스크립트
- 파이어버그
- 코모도 IDE
- 마이크로소프트 스크립트 디버거
- 마이크로소프트 스크립트 편집기
- 오페라 드래곤플라이
- Venkman
- 사파리
- JSDoc
- 에이스
- 아톰
- 코드미러
- 라이트 테이블
- 브래킷
- Koding
- 오리온
- 비주얼 스튜디오
- 비주얼 스튜디오 코드
- 비주얼 스튜디오 팀 서비스
- 레이아웃 엔진 비교
- ECMA스크립트 엔진 목록
- 자바스크립트 엔진 목록
- npm
- NuGet
- 액티브 서버 페이지
- CommonJS
- JSGI
- Node.js
- Deno
- Wakanda