diff --git a/.gitignore b/.gitignore index 8e3dd5b045..cc3c57be99 100644 --- a/.gitignore +++ b/.gitignore @@ -20,4 +20,5 @@ catalog/site/components/*.md catalog/site/components/images catalog/*.tsbuildinfo catalog/stories/*/ -!catalog/stories/components/ \ No newline at end of file +!catalog/stories/components/ +!catalog/src/types/**/*.d.ts \ No newline at end of file diff --git a/catalog/package.json b/catalog/package.json index b071418ed7..cb3cb030a0 100644 --- a/catalog/package.json +++ b/catalog/package.json @@ -22,7 +22,8 @@ "build:dev": { "dependencies": [ "build:dev:eleventy", - "build:dev:ts" + "build:dev:ts", + "build:type-check" ] }, "build:dev:eleventy": { @@ -66,12 +67,16 @@ "clean": "if-file-deleted", "output": [ "tsconfig.tsbuildinfo" + ], + "dependencies": [ + "..:build" ] }, "build:prod": { "dependencies": [ "build:prod:eleventy", - "build:prod:ts" + "build:prod:ts", + "build:type-check" ] }, "build:prod:eleventy": { diff --git a/catalog/src/types/is-land.d.ts b/catalog/src/types/is-land.d.ts new file mode 100644 index 0000000000..e84f473f85 --- /dev/null +++ b/catalog/src/types/is-land.d.ts @@ -0,0 +1,11 @@ +/** + * @license + * Copyright 2023 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +declare module '@11ty/is-land' { + export class Island extends HTMLElement { + forceFallback(): void; + } +} \ No newline at end of file diff --git a/catalog/tsconfig.json b/catalog/tsconfig.json index d62c0783e1..1ee8c16b41 100644 --- a/catalog/tsconfig.json +++ b/catalog/tsconfig.json @@ -12,7 +12,8 @@ "useDefineForClassFields": false, "forceConsistentCasingInFileNames": true, "noEmit": true, - "skipLibCheck": true + "skipLibCheck": true, + "types": [] }, "include": ["src/**/*", "stories/*", "stories/components"], "exclude": []