Skip to content

Commit

Permalink
chore: more types
Browse files Browse the repository at this point in the history
  • Loading branch information
kellyjosephprice committed Feb 14, 2025
1 parent 2e045f3 commit 3221ad7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion example/Doc.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import type { MDXContent } from 'mdx/types';
import type { RMDXModule } from 'types';

import React, { useEffect, useState } from 'react';
import { useParams, useSearchParams } from 'react-router-dom';


import * as mdx from '../index';

import components from './components';
Expand Down Expand Up @@ -61,7 +63,7 @@ const Doc = () => {
const [name, doc] =
fixture === 'edited' ? [fixture, searchParams.get('edit') || ''] : [docs[fixture].name, docs[fixture].doc];

const [{ default: Content, Toc }, setContent] = useState<{ Toc?: MDXContent; default: MDXContent }>({
const [{ default: Content, Toc }, setContent] = useState<Pick<RMDXModule, 'default' | 'Toc'>>({
default: null,
Toc: null,
});
Expand Down

0 comments on commit 3221ad7

Please sign in to comment.