You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Two third-party modules are imported without TypeScript declarations, producing ts(7016) warnings. Both are easy fixes.
astro check warnings
src/pages/tips/rss.xml.ts:17:27 - warning ts(7044): Parameter 'context' implicitly has an 'any' type, but a better type may be inferred from usage.
17 export async function GET(context) {
~~~~~~~
src/pages/tips/rss.xml.ts:12:10 - warning ts(6133): 'components' is declared but its value is never read.
12 import { components, sanitizeOptions } from "src/lib/mdx";
~~~~~~~~~~
src/pages/tips/rss.xml.ts:2:26 - warning ts(7016): Could not find a declaration file for module 'sanitize-html'. '/Users/laurie/dev/accessible-community/ac-website/accessiblecommunity.github.io/astro/node_modules/sanitize-html/index.js' implicitly has an 'any' type.
Try `npm i --save-dev @types/sanitize-html` if it exists or add a new declaration (.d.ts) file containing `declare module 'sanitize-html';`
2 import sanitizeHtml from "sanitize-html";
~~~~~~~~~~~~~~~
src/components/navigation/NavSiteSecondary.astro:109:38 - warning ts(7016): Could not find a declaration file for module '~bootstrap-es'. '/Users/laurie/dev/accessible-community/ac-website/accessiblecommunity.github.io/astro/node_modules/bootstrap/dist/js/bootstrap.esm.min.js' implicitly has an 'any' type.
109 import { Collapse, Dropdown } from "~bootstrap-es";
~~~~~~~~~~~~~~~
src/layouts/DAFLayout.astro:19:19 - warning ts(6133): 'title' is declared but its value is never read.
19 const { metadata, title } = Astro.props;
~~~~~
src/layouts/DAFLayout.astro:65:42 - warning ts(7016): Could not find a declaration file for module '~bootstrap-es'. '/Users/laurie/dev/accessible-community/ac-website/accessiblecommunity.github.io/astro/node_modules/bootstrap/dist/js/bootstrap.esm.min.js' implicitly has an 'any' type.
65 import { Collapse, Dropdown } from "~bootstrap-es";
~~~~~~~~~~~~~~~
src/components/Header.astro:234:38 - warning ts(7016): Could not find a declaration file for module '~bootstrap-es'. '/Users/laurie/dev/accessible-community/ac-website/accessiblecommunity.github.io/astro/node_modules/bootstrap/dist/js/bootstrap.esm.min.js' implicitly has an 'any' type.
234 import { Collapse, Dropdown } from "~bootstrap-es";
~~~~~~~~~~~~~~~
src/components/HeaderER.astro:167:38 - warning ts(7016): Could not find a declaration file for module '~bootstrap-es'. '/Users/laurie/dev/accessible-community/ac-website/accessiblecommunity.github.io/astro/node_modules/bootstrap/dist/js/bootstrap.esm.min.js' implicitly has an 'any' type.
167 import { Collapse, Dropdown } from "~bootstrap-es";
~~~~~~~~~~~~~~~
Suggested fix
1. sanitize-html
cd astro
npm install --save-dev @types/sanitize-html
Commit package.json and package-lock.json.
2. ~bootstrap-es
This is a Vite alias (~bootstrap-es → bootstrap/dist/js/bootstrap.esm.min.js) defined in the project's Vite/Astro config. Add a small .d.ts shim in astro/src/ (or wherever the project keeps ambient types):
Add missing module type declarations (
sanitize-html,~bootstrap-es)Labels:
types,dependenciesEstimated PR size: 1–2 files
Note
Ticket description was generated using Claude Code. Review before starting on a fix.
Note
The following issue adds support for
npm run astro:checkSummary
Two third-party modules are imported without TypeScript declarations, producing
ts(7016)warnings. Both are easy fixes.astro checkwarningsSuggested fix
1.
sanitize-htmlcd astro npm install --save-dev @types/sanitize-htmlCommit
package.jsonandpackage-lock.json.2.
~bootstrap-esThis is a Vite alias (
~bootstrap-es→bootstrap/dist/js/bootstrap.esm.min.js) defined in the project's Vite/Astro config. Add a small.d.tsshim inastro/src/(or wherever the project keeps ambient types):Verify the chosen path is included by
tsconfig.json(the default"include"ofsrc/**/*should catch it).Affected files
astro/package.json,astro/package-lock.json(sanitize-html)astro/src/types/bootstrap-es.d.ts(new) — or wherever the existing ambient types liveAcceptance criteria
ts(7016)warnings clear.npm installfromastro/succeeds.