typescript in lambda code example
Example: typescript lambda type parameter
// For .ts (not .tsx)
const func = <T>() => {
}
// For react Typescript (.tsx)
const func = <T,>() => {
}
// For older versions of react typescript
const func = <T extends unknown>() => {
}