Skip to content

Instantly share code, notes, and snippets.

@leaysgur
Created September 1, 2020 10:02
Show Gist options
  • Save leaysgur/bcb8fbd7918ec2d293135695c0cf883f to your computer and use it in GitHub Desktop.
Save leaysgur/bcb8fbd7918ec2d293135695c0cf883f to your computer and use it in GitHub Desktop.
Use nextjs Link component w/ Preact + TypeScript
import type { VNode, JSX } from "preact";
declare module "react" {
export = React;
export as namespace React;
declare namespace React {
type DetailedReactHTMLElement<
P extends JSX.HTMLAttributes<T>,
T extends HTMLElement
> = VNode<P>;
}
}
@leaysgur
Copy link
Author

leaysgur commented Sep 1, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment