Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/astro/components/Font.astro
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ interface Props {
preload?: boolean;
}

const { cssVariable, preload = false } = Astro.props;
const { cssVariable, preload = false } = Astro.props as Props;
const data = fontsData.get(cssVariable);
if (!data) {
throw new AstroError({
Expand Down
1 change: 1 addition & 0 deletions packages/astro/components/Picture.astro
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ if (useResponsive) {

for (const key in props) {
if (key.startsWith('data-astro-cid')) {
// @ts-expect-error
pictureAttributes[key] = props[key];
}
}
Expand Down
2 changes: 2 additions & 0 deletions packages/astro/components/env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/// <reference path="../client.d.ts" />
/// <reference path="../dev-only.d.ts" />
9 changes: 9 additions & 0 deletions packages/astro/components/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extends": "../../../tsconfig.base.json",
"compilerOptions": {
"allowJs": true,
"emitDeclarationOnly": false,
"noEmit": true,
"jsx": "preserve"
}
}
4 changes: 4 additions & 0 deletions packages/astro/dev-only.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@
declare module 'virtual:astro:env/internal' {
export const schema: import('./src/env/schema.js').EnvSchema;
}

declare module 'virtual:astro:assets/fonts/internal' {
export const fontsData: import('./src/assets/fonts/types.js').ConsumableMap;
}
5 changes: 3 additions & 2 deletions packages/astro/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
"astro": "astro.js"
},
"files": [
"components",
"components/*.{astro,css,ts}",
"tsconfigs",
"dist",
"types",
Expand All @@ -99,7 +99,7 @@
],
"scripts": {
"prebuild": "astro-scripts prebuild --to-string \"src/runtime/server/astro-island.ts\" \"src/runtime/client/{idle,load,media,only,visible}.ts\"",
"build": "pnpm run prebuild && astro-scripts build \"src/**/*.{ts,js}\" --copy-wasm && tsc",
"build": "pnpm run prebuild && astro-scripts build \"src/**/*.{ts,js}\" --copy-wasm && tsc && astro-check --root ./components",
"build:ci": "pnpm run prebuild && astro-scripts build \"src/**/*.{ts,js}\" --copy-wasm",
"dev": "astro-scripts dev --copy-wasm --prebuild \"src/runtime/server/astro-island.ts\" --prebuild \"src/runtime/client/{idle,load,media,only,visible}.ts\" \"src/**/*.{ts,js}\"",
"test": "pnpm run test:unit && pnpm run test:integration && pnpm run test:types",
Expand Down Expand Up @@ -210,6 +210,7 @@
"remark-code-titles": "^0.1.2",
"rollup": "^4.37.0",
"sass": "^1.86.0",
"typescript": "^5.8.3",
"undici": "^7.5.0",
"unified": "^11.0.5",
"vitest": "^3.0.9"
Expand Down
4 changes: 4 additions & 0 deletions pnpm-lock.yaml

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

Loading