2016-10-20 1 views
-1

많은 자바 스크립트 파일에서 언급 된 @ 기호를 발견 했으므로이 문자의 중요성을 알 수 없습니다. 예를 들면 : 그래서
@ 기호는 javascript의 내용을 의미합니까?

/** 
    * Calls the specified callback function for all the elements in an array. The return value of 
    * the callback function is the accumulated result, and is provided as an argument in the next 
    * call to the callback function. 
    * @param callbackfn A function that accepts up to four arguments. The reduce method calls the 
    * callbackfn function one time for each element in the array. 
    * @param initialValue If initialValue is specified, it is used as the initial value to start 
    * the accumulation. The first call to the callbackfn function provides this value as an argument 
    * instead of an array value. 
*/ 

의 @param 여기에 무엇을 의미합니까?
P. - 위에서 callbackfn 및 initialValue를 매개 변수로 사용하는 함수에 대한 설명입니다.

+0

doc 생성 용 - http://usejsdoc.org/에서 exapmple을 찾아보십시오 –

+0

가능한 복제본 : http://stackoverflow.com/questions/14143123/does-the-symbol- have-special-meaning-in-javascript-coffeescript-or-jquery – Tom

답변

1

댓글은 JSDoc입니다. @param callbackfn은 "다음은 인수 callbackfn에 대한 설명입니다."를 의미합니다.

IDE에서 해당 형식을 구문 분석 할 수 있거나 use jsdoc에서 문서를 생성 할 수 있습니다.

+0

정의 typescript 파일에서이 JSDoc을 구문 분석 할 수있는 방법이 있습니까? –

0

문서 목적으로 만 사용됩니다.

@param은 예를 들어 어떤 함수가 어떤 매개 변수를 사용하는지 나타냅니다. @author와 같이 몇 가지 더 있습니다.

0

이는 javadoc 스타일의 주석입니다. javadoc 문서를 참조하십시오

관련 문제