I don't think this would be an easy task, but some libraries (i.e. linaria/react)'s type definitions are based on the type definitions of @types/react, which isn't compatible with Preact's type definitions. I tried aliasing TypeScript module resolution via tsconfig but it didn't give me the result I expected.
Could we have a compatible type definitions on preact/compat? Any solutions for solving this type issue is also welcome.