Is there a way to write code without using the <T>
notation when it's not necessary?
Here is what I have in mind:
interface Props<?T> {
className: string
data?: T
}
const props: Props = {className: "hello, world"}
const propswithdata: Props<T> = {className: "hw", data: {something: "something"}}