HomeAssistant 프론트 엔드 소스 코드를 이해하려고합니다. 나는 잘 이해하지 못하는 함수 정의를 발견했다.이 화살표 기능 JavaScript 코드는 무엇을 의미합니까?
return [[string, string], bool]
: 나는
export function createHasDataGetter(model) {
return [
['restApiCache', model.entity],
entityMap => !!entityMap,
];
}
그것은 같은 떨어지게처럼 보이는 ...이 구문을 (model.entity 문자열입니다) 이해 해달라고?
이 함수의 exacly teturn 유형은 무엇입니까? 이거 그냥 쓸모 없어? 그렇다면 entityMap이 문자열 배열임을 의미합니까?
이미 화살표 기능을 알고 있다면 무엇을 혼동하고 있습니까? 당신이 이미 그것이 함수이고'bool '이 아니라는 것을 알고있는 것처럼 보입니다. –
중복 : http://stackoverflow.com/questions/24900875/whats-the-meaning-of-an-arrow-formed-from-equals-greater-than-in-javas?noredirect=1&lq=1 – Paulpro
'entityMap => !! entityMap'은'function (entityMap) {return !! 엔티티 맵 (entityMap); } ' – Paulpro