강의

멘토링

로드맵

Inflearn Community Q&A

hufsan879222's profile image
hufsan879222

asked

Angular(2+) From Front to Back - To know Nest js, you need to know Angular modules!

TypeScript Knowledge for Understanding Angular 2

typescript관련

Written on

·

1.4K

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.
Angular

Answer 2

0

저도 같은 문제가 발생했었는데

아래와 같이 해결했습니다!

// tsconfig.json에서 "experimentalDecorators": true, 설정 -> 안됨
// tsconfig.json에서 restrict 주석 처리
// > tsc 4_decoration.ts --experimentalDecorators "true"

0

youngtaekim님의 프로필 이미지
youngtaekim
Instructor

타입스크립트 설정이랑 관련있을 것 같은데 정확하게는 원인을 모르겠네요 좀더 자세한 정보를 주실 수 있을까요? 

hufsan879222's profile image
hufsan879222

asked

Ask a question