Skip to content
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
Cannot retrieve contributors at this time

Parameters 简单 #infer #tuple #built-in

by midorizemi @midorizemi

接受挑战    English 日本語 한국어

实现内置的 Parameters 类型,而不是直接使用它,可参考TypeScript官方文档


const foo = (arg1: string, arg2: number): void => {}

type FunctionParamsType = MyParameters<typeof foo> // [arg1: string, arg2: number]

返回首页 分享你的解答 查看解答