Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

typescript generic object not array

type NotArray<T> = T extends Array<unknown> ? never : T;

function f<T>(arg: NotArray<T>) {

}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #typescript #generic #object #array
ADD COMMENT
Topic
Name
9+1 =