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>;
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Parameter #type #function #TypeScript
ADD COMMENT
Topic
Name
6+2 =