Skip to content

Commit

Permalink
Fix TypeScript compilation errors (#4683)
Browse files Browse the repository at this point in the history
* Fix TypeScript compilation errors

* Update lockfile

* Add changeset
  • Loading branch information
Princesseuh committed Sep 8, 2022
1 parent 4c05c65 commit cc242d3
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 14 deletions.
5 changes: 5 additions & 0 deletions .changeset/ninety-donuts-hunt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Fix `tsc` compilation errors when `skipLibCheck` wasn't enabled
6 changes: 3 additions & 3 deletions packages/astro/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@
"@babel/types": "^7.18.4",
"@proload/core": "^0.3.2",
"@proload/plugin-tsm": "^0.2.1",
"@types/babel__core": "^7.1.19",
"@types/html-escaper": "^3.0.0",
"@types/yargs-parser": "^21.0.0",
"boxen": "^6.2.1",
"ci-info": "^3.3.1",
"common-ancestor-path": "^1.0.1",
Expand Down Expand Up @@ -151,7 +154,6 @@
},
"devDependencies": {
"@playwright/test": "^1.22.2",
"@types/babel__core": "^7.1.19",
"@types/babel__generator": "^7.6.4",
"@types/babel__traverse": "^7.17.1",
"@types/chai": "^4.3.1",
Expand All @@ -160,7 +162,6 @@
"@types/debug": "^4.1.7",
"@types/diff": "^5.0.2",
"@types/estree": "^0.0.51",
"@types/html-escaper": "^3.0.0",
"@types/mime": "^2.0.3",
"@types/mocha": "^9.1.1",
"@types/parse5": "^6.0.3",
Expand All @@ -170,7 +171,6 @@
"@types/rimraf": "^3.0.2",
"@types/send": "^0.17.1",
"@types/unist": "^2.0.6",
"@types/yargs-parser": "^21.0.0",
"ast-types": "^0.14.2",
"astro-scripts": "workspace:*",
"chai": "^4.3.6",
Expand Down
7 changes: 5 additions & 2 deletions packages/astro/src/@types/astro.ts
Original file line number Diff line number Diff line change
Expand Up @@ -924,7 +924,7 @@ export interface MarkdownInstance<T extends Record<string, any>> {
default: AstroComponentFactory;
}

export interface MDXInstance<T>
export interface MDXInstance<T extends Record<string, any>>
extends Omit<MarkdownInstance<T>, 'rawContent' | 'compiledContent'> {
/** MDX does not support rawContent! If you need to read the Markdown contents to calculate values (ex. reading time), we suggest injecting frontmatter via remark plugins. Learn more on our docs: https://docs.astro.build/en/guides/integrations-guide/mdx/#inject-frontmatter-via-remark-or-rehype-plugins */
rawContent: never;
Expand All @@ -944,7 +944,10 @@ export interface MarkdownLayoutProps<T extends Record<string, any>> {
compiledContent: MarkdownInstance<T>['compiledContent'];
}

export type MDXLayoutProps<T> = Omit<MarkdownLayoutProps<T>, 'rawContent' | 'compiledContent'>;
export type MDXLayoutProps<T extends Record<string, any>> = Omit<
MarkdownLayoutProps<T>,
'rawContent' | 'compiledContent'
>;

export type GetHydrateCallback = () => Promise<() => void | Promise<void>>;

Expand Down
15 changes: 6 additions & 9 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit cc242d3

Please sign in to comment.