-
카테고리
-
세부 분야
프론트엔드
-
해결 여부
미해결
typescript관련
20.06.10 17:27 작성 조회수 970
1
코드를 따라서 하다가 저만 오류나는 상황입니다..ㅡ,,ㅡ
function Component(constructorfn?:Function){
return constructorfn
}
@Component()
class AppComponent{
constructor(){
}
}
function Component(constructorfn?: Function | undefined): Function | undefined
Unable to resolve signature of class decorator when called as an expression.
This expression is not callable.
No constituent of type 'Function | undefined' is callable.
This expression is not callable.
No constituent of type 'Function | undefined' is callable.
답변을 작성해보세요.
0
Kyuyoung Jang
2020.12.30
저도 같은 문제가 발생했었는데
아래와 같이 해결했습니다!
// tsconfig.json에서 "experimentalDecorators": true, 설정 -> 안됨
// tsconfig.json에서 restrict 주석 처리
// > tsc 4_decoration.ts --experimentalDecorators "true"
0
답변 2