2017-04-13 1 views
0

나는 다음과 같이 내 TypeScipt 프로그램에 대해 forEach를 사용하려고 해요 찾을 수 없습니다타이프 라이터 이름 foreach 문

"TS2304 찾을 수없는 이름을 '대해 forEach ' "

내 tsconfig.json :

{ 
    "compilerOptions": { 
    "module": "commonjs", 
    "target": "es5", 
    "noImplicitAny": false, 
    "sourceMap": false, 
    "types": [ 
     "node" 
    ], 
    "typeRoots": [ 
     "node_modules/@types" 
    ] 
}, 
    "exclude": [ 
    "lib/startup.ts", 
    "node_modules/", 
    "typings/" 
    ] 
} 
+0

현재 tsconfig를 표시합니다. –

+0

'forEach'를 호출하는 코드 스 니펫을 표시 할 수 있습니까? –

+0

'treeChildren (tree)'의 모든 객체에서'treeForEachDF'를 실행한다고 가정합니다. 시도해 봤어 :'treeChildren (tree) .forEach (child => treeForEachDF (f, child));'? –

답변

0

은 분명히 내가의 노력으로 대해 forEach를 사용하는 방법이 첫 번째 장소는 다음과 같이 'ramda'에서 가져옵니다.

import {map, reduce, forEach} from 'ramda'