0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-23 21:53:55 -05:00

Fix TypeScript compilation errors (#4683)

* Fix TypeScript compilation errors

* Update lockfile

* Add changeset
This commit is contained in:
Erika 2022-09-08 16:31:54 -03:00 committed by GitHub
parent 4c05c65a3d
commit cc242d3af2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 19 additions and 14 deletions

View file

@ -0,0 +1,5 @@
---
'astro': patch
---
Fix `tsc` compilation errors when `skipLibCheck` wasn't enabled

View file

@ -107,6 +107,9 @@
"@babel/types": "^7.18.4", "@babel/types": "^7.18.4",
"@proload/core": "^0.3.2", "@proload/core": "^0.3.2",
"@proload/plugin-tsm": "^0.2.1", "@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", "boxen": "^6.2.1",
"ci-info": "^3.3.1", "ci-info": "^3.3.1",
"common-ancestor-path": "^1.0.1", "common-ancestor-path": "^1.0.1",
@ -151,7 +154,6 @@
}, },
"devDependencies": { "devDependencies": {
"@playwright/test": "^1.22.2", "@playwright/test": "^1.22.2",
"@types/babel__core": "^7.1.19",
"@types/babel__generator": "^7.6.4", "@types/babel__generator": "^7.6.4",
"@types/babel__traverse": "^7.17.1", "@types/babel__traverse": "^7.17.1",
"@types/chai": "^4.3.1", "@types/chai": "^4.3.1",
@ -160,7 +162,6 @@
"@types/debug": "^4.1.7", "@types/debug": "^4.1.7",
"@types/diff": "^5.0.2", "@types/diff": "^5.0.2",
"@types/estree": "^0.0.51", "@types/estree": "^0.0.51",
"@types/html-escaper": "^3.0.0",
"@types/mime": "^2.0.3", "@types/mime": "^2.0.3",
"@types/mocha": "^9.1.1", "@types/mocha": "^9.1.1",
"@types/parse5": "^6.0.3", "@types/parse5": "^6.0.3",
@ -170,7 +171,6 @@
"@types/rimraf": "^3.0.2", "@types/rimraf": "^3.0.2",
"@types/send": "^0.17.1", "@types/send": "^0.17.1",
"@types/unist": "^2.0.6", "@types/unist": "^2.0.6",
"@types/yargs-parser": "^21.0.0",
"ast-types": "^0.14.2", "ast-types": "^0.14.2",
"astro-scripts": "workspace:*", "astro-scripts": "workspace:*",
"chai": "^4.3.6", "chai": "^4.3.6",

View file

@ -924,7 +924,7 @@ export interface MarkdownInstance<T extends Record<string, any>> {
default: AstroComponentFactory; default: AstroComponentFactory;
} }
export interface MDXInstance<T> export interface MDXInstance<T extends Record<string, any>>
extends Omit<MarkdownInstance<T>, 'rawContent' | 'compiledContent'> { 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 */ /** 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; rawContent: never;
@ -944,7 +944,10 @@ export interface MarkdownLayoutProps<T extends Record<string, any>> {
compiledContent: MarkdownInstance<T>['compiledContent']; 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>>; export type GetHydrateCallback = () => Promise<() => void | Promise<void>>;

View file

@ -434,6 +434,9 @@ importers:
'@babel/types': 7.19.0 '@babel/types': 7.19.0
'@proload/core': 0.3.3 '@proload/core': 0.3.3
'@proload/plugin-tsm': 0.2.1_@proload+core@0.3.3 '@proload/plugin-tsm': 0.2.1_@proload+core@0.3.3
'@types/babel__core': 7.1.19
'@types/html-escaper': 3.0.0
'@types/yargs-parser': 21.0.0
boxen: 6.2.1 boxen: 6.2.1
ci-info: 3.3.2 ci-info: 3.3.2
common-ancestor-path: 1.0.1 common-ancestor-path: 1.0.1
@ -477,7 +480,6 @@ importers:
zod: 3.19.0 zod: 3.19.0
devDependencies: devDependencies:
'@playwright/test': 1.25.2 '@playwright/test': 1.25.2
'@types/babel__core': 7.1.19
'@types/babel__generator': 7.6.4 '@types/babel__generator': 7.6.4
'@types/babel__traverse': 7.18.1 '@types/babel__traverse': 7.18.1
'@types/chai': 4.3.3 '@types/chai': 4.3.3
@ -486,7 +488,6 @@ importers:
'@types/debug': 4.1.7 '@types/debug': 4.1.7
'@types/diff': 5.0.2 '@types/diff': 5.0.2
'@types/estree': 0.0.51 '@types/estree': 0.0.51
'@types/html-escaper': 3.0.0
'@types/mime': 2.0.3 '@types/mime': 2.0.3
'@types/mocha': 9.1.1 '@types/mocha': 9.1.1
'@types/parse5': 6.0.3 '@types/parse5': 6.0.3
@ -496,7 +497,6 @@ importers:
'@types/rimraf': 3.0.2 '@types/rimraf': 3.0.2
'@types/send': 0.17.1 '@types/send': 0.17.1
'@types/unist': 2.0.6 '@types/unist': 2.0.6
'@types/yargs-parser': 21.0.0
ast-types: 0.14.2 ast-types: 0.14.2
astro-scripts: link:../../scripts astro-scripts: link:../../scripts
chai: 4.3.6 chai: 4.3.6
@ -8818,26 +8818,24 @@ packages:
'@types/babel__generator': 7.6.4 '@types/babel__generator': 7.6.4
'@types/babel__template': 7.4.1 '@types/babel__template': 7.4.1
'@types/babel__traverse': 7.18.1 '@types/babel__traverse': 7.18.1
dev: true dev: false
/@types/babel__generator/7.6.4: /@types/babel__generator/7.6.4:
resolution: {integrity: sha512-tFkciB9j2K755yrTALxD44McOrk+gfpIpvC3sxHjRawj6PfnQxrse4Clq5y/Rq+G3mrBurMax/lG8Qn2t9mSsg==} resolution: {integrity: sha512-tFkciB9j2K755yrTALxD44McOrk+gfpIpvC3sxHjRawj6PfnQxrse4Clq5y/Rq+G3mrBurMax/lG8Qn2t9mSsg==}
dependencies: dependencies:
'@babel/types': 7.19.0 '@babel/types': 7.19.0
dev: true
/@types/babel__template/7.4.1: /@types/babel__template/7.4.1:
resolution: {integrity: sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g==} resolution: {integrity: sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g==}
dependencies: dependencies:
'@babel/parser': 7.19.0 '@babel/parser': 7.19.0
'@babel/types': 7.19.0 '@babel/types': 7.19.0
dev: true dev: false
/@types/babel__traverse/7.18.1: /@types/babel__traverse/7.18.1:
resolution: {integrity: sha512-FSdLaZh2UxaMuLp9lixWaHq/golWTRWOnRsAXzDTDSDOQLuZb1nsdCt6pJSPWSEQt2eFZ2YVk3oYhn+1kLMeMA==} resolution: {integrity: sha512-FSdLaZh2UxaMuLp9lixWaHq/golWTRWOnRsAXzDTDSDOQLuZb1nsdCt6pJSPWSEQt2eFZ2YVk3oYhn+1kLMeMA==}
dependencies: dependencies:
'@babel/types': 7.19.0 '@babel/types': 7.19.0
dev: true
/@types/chai-as-promised/7.1.5: /@types/chai-as-promised/7.1.5:
resolution: {integrity: sha512-jStwss93SITGBwt/niYrkf2C+/1KTeZCZl1LaeezTlqppAKeoQC7jxyqYuP72sxBGKCIbw7oHgbYssIRzT5FCQ==} resolution: {integrity: sha512-jStwss93SITGBwt/niYrkf2C+/1KTeZCZl1LaeezTlqppAKeoQC7jxyqYuP72sxBGKCIbw7oHgbYssIRzT5FCQ==}
@ -8926,7 +8924,7 @@ packages:
/@types/html-escaper/3.0.0: /@types/html-escaper/3.0.0:
resolution: {integrity: sha512-OcJcvP3Yk8mjYwf/IdXZtTE1tb/u0WF0qa29ER07ZHCYUBZXSN29Z1mBS+/96+kNMGTFUAbSz9X+pHmHpZrTCw==} resolution: {integrity: sha512-OcJcvP3Yk8mjYwf/IdXZtTE1tb/u0WF0qa29ER07ZHCYUBZXSN29Z1mBS+/96+kNMGTFUAbSz9X+pHmHpZrTCw==}
dev: true dev: false
/@types/is-ci/3.0.0: /@types/is-ci/3.0.0:
resolution: {integrity: sha512-Q0Op0hdWbYd1iahB+IFNQcWXFq4O0Q5MwQP7uN0souuQ4rPg1vEYcnIOfr1gY+M+6rc8FGoRaBO1mOOvL29sEQ==} resolution: {integrity: sha512-Q0Op0hdWbYd1iahB+IFNQcWXFq4O0Q5MwQP7uN0souuQ4rPg1vEYcnIOfr1gY+M+6rc8FGoRaBO1mOOvL29sEQ==}
@ -9137,7 +9135,6 @@ packages:
/@types/yargs-parser/21.0.0: /@types/yargs-parser/21.0.0:
resolution: {integrity: sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==} resolution: {integrity: sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==}
dev: true
/@typescript-eslint/eslint-plugin/5.36.2_kou65mzxaniwtkb2mhvaghdcyi: /@typescript-eslint/eslint-plugin/5.36.2_kou65mzxaniwtkb2mhvaghdcyi:
resolution: {integrity: sha512-OwwR8LRwSnI98tdc2z7mJYgY60gf7I9ZfGjN5EjCwwns9bdTuQfAXcsjSB2wSQ/TVNYSGKf4kzVXbNGaZvwiXw==} resolution: {integrity: sha512-OwwR8LRwSnI98tdc2z7mJYgY60gf7I9ZfGjN5EjCwwns9bdTuQfAXcsjSB2wSQ/TVNYSGKf4kzVXbNGaZvwiXw==}