Skip to content

Commit

Permalink
Add type for *.astro files, so "pnpm typecheck" in the workspace will…
Browse files Browse the repository at this point in the history
… not fail on imports of .astro modules from .ts modules.
  • Loading branch information
danielnaab committed Oct 11, 2024
1 parent b507717 commit ec94b0b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions packages/server/globals.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
declare module '*.astro' {
const Component: any;
export default Component;
}
8 changes: 7 additions & 1 deletion packages/server/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@
"resolveJsonModule": true,
"types": ["@testing-library/jest-dom"]
},
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.astro"],
"include": [
"globals.d.ts",
"src/**/*.ts",
"src/**/*.tsx",
"src/**/*.astro",
"src/**/*.js"
],
"exclude": [".astro", "dist", "node_modules"]
}

0 comments on commit ec94b0b

Please sign in to comment.