개념
constructor function의 파라미터의 type을 반환하는 Utility Type
class A {
constructor(b: number) {
}
}
type T0 = ConstructorParameters<typeof A>;
/**
*
* [b: number]
*
*/
'IT > typescript' 카테고리의 다른 글
[typescript] Array가 Record type에 호환이 된다고? (0) | 2024.03.13 |
---|---|
[Typescript] Complier Options - suppressImplicitAnyIndexErrors (0) | 2024.03.12 |
[Typescript] Parameters<Type> (0) | 2024.03.11 |
[Typescript] Type-Only Imports and Export (0) | 2024.03.08 |
[Typescript] satisfies (0) | 2024.02.22 |