<T extends {new(...args:any[]):{}}> - You are basically saying that your class need a constructor in its definition through this (new...)정적 타이핑 확장 안댐
Request: Class Decorator Mutation · Issue #4881 · microsoft/TypeScript
If we can get this to type check properly, we would have perfect support for boilerplate-free mixins: declare function Blah (target: T): T & {foo: number} @Blah class Foo { bar() { return this.foo; // Property 'foo' does not exist on t...
https://github.com/microsoft/TypeScript/issues/4881
What does (constructor:T) mean in typescript?
Thanks for contributing an answer to Stack Overflow! Please be sure to answer the question. Provide details and share your research! Asking for help, clarification, or responding to other answers. Making statements based on opinion; back them up with references or personal experience. To learn more, see our tips on writing great answers.
https://stackoverflow.com/questions/58057916/what-does-t-extends-new-args-any-constructort-mean-in-typescr
[typescript] 타입스크립트 데코레이터 1편 - 데코레이터 4가지 기본구조 알아보기
해당 부분도 이해가 좀 안될 수 있는데... 해당 코드를 이해하기 전에 익명함수를 떠올린다면 조금 수월하게 이해할 수 있습니다. 클래스도 익명함수처럼 이름이 꼭 있을필요는 없습니다. 즉, 이름 없는 클래스를 만들어 앞에서 전달받은 클래스를 상속받습니다. 문법이 좀 괴랄해 보이지만 계속 보면서 익숙해집시다. 여기서 만약 데코레이터를 통해 데이터를 전달하고 싶다면 데코레이터에 값을 전달하면 됩니다.
https://m.blog.naver.com/pjt3591oo/222120496022

Seonglae Cho