I am looking for a structure similar to
interface propType {
value: T
action: (value: T) => void
}
The variable T
can be any type, but it must be consistent for both value
and action
. Using any
is not suitable as it could lead to a mismatch in types.