Skip to content

Commit

Permalink
Use @types/mdx for mdx import type
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobwgillespie committed May 18, 2023
1 parent d163278 commit 2ad5f62
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 26 deletions.
24 changes: 2 additions & 22 deletions packages/remix-dev/modules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,34 +67,14 @@ declare module "*.jpg" {
export default asset;
}
declare module "*.md" {
import type { ComponentType, ReactHTML } from "react";
import "mdx/types";
export let attributes: any;
export let filename: string;
let Component: ComponentType<
Readonly<Record<string, unknown>> & {
components?: Readonly<
Partial<
Record<keyof ReactHTML | "wrapper", keyof ReactHTML | ComponentType>
>
>;
}
>;
export default Component;
}
declare module "*.mdx" {
import type { ComponentType, ReactHTML } from "react";
import "mdx/types";
export let attributes: any;
export let filename: string;
let Component: ComponentType<
Readonly<Record<string, unknown>> & {
components?: Readonly<
Partial<
Record<keyof ReactHTML | "wrapper", keyof ReactHTML | ComponentType>
>
>;
}
>;
export default Component;
}
declare module "*.mp3" {
let asset: string;
Expand Down
1 change: 1 addition & 0 deletions packages/remix-dev/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"@mdx-js/mdx": "^2.3.0",
"@npmcli/package-json": "^2.0.0",
"@remix-run/server-runtime": "1.16.1",
"@types/mdx": "^2.0.5",
"@vanilla-extract/integration": "^6.2.0",
"arg": "^5.0.1",
"cacache": "^15.0.5",
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3157,10 +3157,10 @@
resolved "https://registry.npmjs.org/@types/mdurl/-/mdurl-1.0.2.tgz"
integrity sha512-eC4U9MlIcu2q0KQmXszyn5Akca/0jrQmwDRgpAMJai7qBWq4amIQhZyNau4VYGtCeALvW1/NtjzJJ567aZxfKA==

"@types/mdx@^2.0.0":
version "2.0.2"
resolved "https://registry.yarnpkg.com/@types/mdx/-/mdx-2.0.2.tgz#64be19baddba4323ae7893e077e98759316fe279"
integrity sha512-mJGfgj4aWpiKb8C0nnJJchs1sHBHn0HugkVfqqyQi7Wn6mBRksLeQsPOFvih/Pu8L1vlDzfe/LidhVHBeUk3aQ==
"@types/mdx@^2.0.0", "@types/mdx@^2.0.5":
version "2.0.5"
resolved "https://registry.npmjs.org/@types/mdx/-/mdx-2.0.5.tgz#9a85a8f70c7c4d9e695a21d5ae5c93645eda64b1"
integrity sha512-76CqzuD6Q7LC+AtbPqrvD9AqsN0k8bsYo2bM2J8pmNldP1aIPAbzUQ7QbobyXL4eLr1wK5x8FZFe8eF/ubRuBg==

"@types/mime@^1":
version "1.3.2"
Expand Down

0 comments on commit 2ad5f62

Please sign in to comment.