12. ReturnType<T> を実装する
シェアしよう
- accepted / - tried
Parameters<T>が引数に対して、
ReturnType<T>
はfunction type Tのreturn typeを返す。
MyReturnType<T>
を実装してみてください。
type Foo = () => {a: string}type A = MyReturnType<Foo> // {a: string}
- accepted / - tried
Parameters<T>が引数に対して、
ReturnType<T>
はfunction type Tのreturn typeを返す。
MyReturnType<T>
を実装してみてください。
type Foo = () => {a: string}type A = MyReturnType<Foo> // {a: string}