generic.d.ts 855 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. type Option<T> = Some<T> | None;
  2. type Entries<T> = {
  3. [K in keyof T]: [K, T[K]];
  4. }[keyof T][];
  5. type SearchParams<TKeys extends string = string> = Promise<
  6. Record<TKeys, string | string[] | undefined>
  7. >;
  8. type SiteConfig = {
  9. name: string;
  10. domain: string;
  11. description: string;
  12. url: string;
  13. ogImage: string;
  14. links: {
  15. twitter?: string;
  16. github?: string;
  17. docs?: string;
  18. changelog?: string;
  19. };
  20. twitterHandle?: string;
  21. twitterId?: string;
  22. };
  23. type NotFoundResponse = { notFound: true };
  24. type SimpleComponentProps = {
  25. children?: React.ReactNode;
  26. className?: string;
  27. };
  28. type ImageSize = {
  29. width: number;
  30. height: number;
  31. };
  32. type LinkDetails = {
  33. title: string;
  34. href: string;
  35. description?: React.ReactNode;
  36. icon?: string;
  37. subLinks?: SubLinkDetails[];
  38. };
  39. type SubLinkDetails = Omit<LinkDetails, "subLinks">;