Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

Parameter type from function TypeScript

//parameter
type Parameter<T extends (...args: any[]) => any> = T extends (...args: infer P) => any ? P : never;
type paraMeterCheck = Parameter<(a: string, b: string) => void>;
 
PREVIOUS NEXT
Tagged: #Parameter #type #function #TypeScript
ADD COMMENT
Topic
Name
3+5 =