Skip to content

Commit 21869a6

Browse files
authored
Move client types into Astro (#3851)
* Move client types into Astro * Adds a changeset * Fix path to local client * Reference vite/client in our HMR types * Add back in the expect-error * Update types comment
1 parent 16fdc01 commit 21869a6

File tree

34 files changed

+272
-57
lines changed

34 files changed

+272
-57
lines changed

.changeset/healthy-poems-know.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'astro': patch
3+
---
4+
5+
Replaces vite/client types with astro/client

examples/basics/tsconfig.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"resolveJsonModule": true,
1010
// Enable stricter transpilation for better output.
1111
"isolatedModules": true,
12-
// Add type definitions for our Vite runtime.
13-
"types": ["vite/client"]
12+
// Add type definitions for our Astro runtime.
13+
"types": ["astro/client"]
1414
}
1515
}

examples/blog-multiple-authors/tsconfig.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"resolveJsonModule": true,
1010
// Enable stricter transpilation for better output.
1111
"isolatedModules": true,
12-
// Add type definitions for our Vite runtime.
13-
"types": ["vite/client"]
12+
// Add type definitions for our Astro runtime.
13+
"types": ["astro/client"]
1414
}
1515
}

examples/blog/tsconfig.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"resolveJsonModule": true,
1010
// Enable stricter transpilation for better output.
1111
"isolatedModules": true,
12-
// Add type definitions for our Vite runtime.
13-
"types": ["vite/client"]
12+
// Add type definitions for our Astro runtime.
13+
"types": ["astro/client"]
1414
}
1515
}

examples/docs/tsconfig.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"resolveJsonModule": true,
1010
// Enable stricter transpilation for better output.
1111
"isolatedModules": true,
12-
// Add type definitions for our Vite runtime.
13-
"types": ["vite/client"]
12+
// Add type definitions for our Astro runtime.
13+
"types": ["astro/client"]
1414
}
1515
}

examples/env-vars/src/env.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/// <reference types="vite/client" />
1+
/// <reference types="astro/client" />
22

33
interface ImportMetaEnv {
44
readonly DB_PASSWORD: string;

examples/env-vars/tsconfig.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"resolveJsonModule": true,
1010
// Enable stricter transpilation for better output.
1111
"isolatedModules": true,
12-
// Add type definitions for our Vite runtime.
13-
"types": ["vite/client"]
12+
// Add type definitions for our Astro runtime.
13+
"types": ["astro/client"]
1414
}
1515
}

examples/framework-alpine/tsconfig.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"resolveJsonModule": true,
1010
// Enable stricter transpilation for better output.
1111
"isolatedModules": true,
12-
// Add type definitions for our Vite runtime.
13-
"types": ["vite/client"]
12+
// Add type definitions for our Astro runtime.
13+
"types": ["astro/client"]
1414
}
1515
}

examples/framework-lit/tsconfig.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"resolveJsonModule": true,
1010
// Enable stricter transpilation for better output.
1111
"isolatedModules": true,
12-
// Add type definitions for our Vite runtime.
13-
"types": ["vite/client"]
12+
// Add type definitions for our Astro runtime.
13+
"types": ["astro/client"]
1414
}
1515
}

examples/framework-multiple/tsconfig.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"resolveJsonModule": true,
1010
// Enable stricter transpilation for better output.
1111
"isolatedModules": true,
12-
// Add type definitions for our Vite runtime.
13-
"types": ["vite/client"]
12+
// Add type definitions for our Astro runtime.
13+
"types": ["astro/client"]
1414
}
1515
}

examples/framework-preact/tsconfig.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"resolveJsonModule": true,
1313
// Enable stricter transpilation for better output.
1414
"isolatedModules": true,
15-
// Add type definitions for our Vite runtime.
16-
"types": ["vite/client"]
15+
// Add type definitions for our Astro runtime.
16+
"types": ["astro/client"]
1717
}
1818
}

examples/framework-react/tsconfig.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"resolveJsonModule": true,
1010
// Enable stricter transpilation for better output.
1111
"isolatedModules": true,
12-
// Add type definitions for our Vite runtime.
13-
"types": ["vite/client"]
12+
// Add type definitions for our Astro runtime.
13+
"types": ["astro/client"]
1414
}
1515
}

examples/framework-solid/tsconfig.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"resolveJsonModule": true,
1313
// Enable stricter transpilation for better output.
1414
"isolatedModules": true,
15-
// Add type definitions for our Vite runtime.
16-
"types": ["vite/client"]
15+
// Add type definitions for our Astro runtime.
16+
"types": ["astro/client"]
1717
}
1818
}

examples/framework-svelte/tsconfig.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"resolveJsonModule": true,
1010
// Enable stricter transpilation for better output.
1111
"isolatedModules": true,
12-
// Add type definitions for our Vite runtime.
13-
"types": ["vite/client"]
12+
// Add type definitions for our Astro runtime.
13+
"types": ["astro/client"]
1414
}
1515
}

examples/framework-vue/tsconfig.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"resolveJsonModule": true,
1010
// Enable stricter transpilation for better output.
1111
"isolatedModules": true,
12-
// Add type definitions for our Vite runtime.
13-
"types": ["vite/client"]
12+
// Add type definitions for our Astro runtime.
13+
"types": ["astro/client"]
1414
}
1515
}

examples/integrations-playground/tsconfig.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"resolveJsonModule": true,
1010
// Enable stricter transpilation for better output.
1111
"isolatedModules": true,
12-
// Add type definitions for our Vite runtime.
13-
"types": ["vite/client"]
12+
// Add type definitions for our Astro runtime.
13+
"types": ["astro/client"]
1414
}
1515
}

examples/minimal/tsconfig.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"resolveJsonModule": true,
1010
// Enable stricter transpilation for better output.
1111
"isolatedModules": true,
12-
// Add type definitions for our Vite runtime.
13-
"types": ["vite/client"]
12+
// Add type definitions for our Astro runtime.
13+
"types": ["astro/client"]
1414
}
1515
}

examples/non-html-pages/tsconfig.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"resolveJsonModule": true,
1010
// Enable stricter transpilation for better output.
1111
"isolatedModules": true,
12-
// Add type definitions for our Vite runtime.
13-
"types": ["vite/client"]
12+
// Add type definitions for our Astro runtime.
13+
"types": ["astro/client"]
1414
}
1515
}

examples/portfolio/tsconfig.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"resolveJsonModule": true,
1010
// Enable stricter transpilation for better output.
1111
"isolatedModules": true,
12-
// Add type definitions for our Vite runtime.
13-
"types": ["vite/client"]
12+
// Add type definitions for our Astro runtime.
13+
"types": ["astro/client"]
1414
}
1515
}

examples/ssr/tsconfig.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"resolveJsonModule": true,
1010
// Enable stricter transpilation for better output.
1111
"isolatedModules": true,
12-
// Add type definitions for our Vite runtime.
13-
"types": ["vite/client"]
12+
// Add type definitions for our Astro runtime.
13+
"types": ["astro/client"]
1414
}
1515
}

examples/starter/tsconfig.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"resolveJsonModule": true,
1010
// Enable stricter transpilation for better output.
1111
"isolatedModules": true,
12-
// Add type definitions for our Vite runtime.
13-
"types": ["vite/client"]
12+
// Add type definitions for our Astro runtime.
13+
"types": ["astro/client"]
1414
}
1515
}

examples/subpath/tsconfig.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"resolveJsonModule": true,
1010
// Enable stricter transpilation for better output.
1111
"isolatedModules": true,
12-
// Add type definitions for our Vite runtime.
13-
"types": ["vite/client"]
12+
// Add type definitions for our Astro runtime.
13+
"types": ["astro/client"]
1414
}
1515
}

examples/with-markdown-plugins/tsconfig.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"resolveJsonModule": true,
1010
// Enable stricter transpilation for better output.
1111
"isolatedModules": true,
12-
// Add type definitions for our Vite runtime.
13-
"types": ["vite/client"]
12+
// Add type definitions for our Astro runtime.
13+
"types": ["astro/client"]
1414
}
1515
}

examples/with-markdown-shiki/tsconfig.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"resolveJsonModule": true,
1010
// Enable stricter transpilation for better output.
1111
"isolatedModules": true,
12-
// Add type definitions for our Vite runtime.
13-
"types": ["vite/client"]
12+
// Add type definitions for our Astro runtime.
13+
"types": ["astro/client"]
1414
}
1515
}

examples/with-markdown/tsconfig.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"resolveJsonModule": true,
1010
// Enable stricter transpilation for better output.
1111
"isolatedModules": true,
12-
// Add type definitions for our Vite runtime.
13-
"types": ["vite/client"]
12+
// Add type definitions for our Astro runtime.
13+
"types": ["astro/client"]
1414
}
1515
}

examples/with-mdx/tsconfig.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"resolveJsonModule": true,
1010
// Enable stricter transpilation for better output.
1111
"isolatedModules": true,
12-
// Add type definitions for our Vite runtime.
13-
"types": ["vite/client"]
12+
// Add type definitions for our Astro runtime.
13+
"types": ["astro/client"]
1414
}
1515
}

examples/with-nanostores/tsconfig.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"resolveJsonModule": true,
1010
// Enable stricter transpilation for better output.
1111
"isolatedModules": true,
12-
// Add type definitions for our Vite runtime.
13-
"types": ["vite/client"]
12+
// Add type definitions for our Astro runtime.
13+
"types": ["astro/client"]
1414
}
1515
}

examples/with-tailwindcss/tsconfig.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"resolveJsonModule": true,
1010
// Enable stricter transpilation for better output.
1111
"isolatedModules": true,
12-
// Add type definitions for our Vite runtime.
13-
"types": ["vite/client"]
12+
// Add type definitions for our Astro runtime.
13+
"types": ["astro/client"]
1414
}
1515
}

examples/with-vite-plugin-pwa/tsconfig.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"resolveJsonModule": true,
1010
// Enable stricter transpilation for better output.
1111
"isolatedModules": true,
12-
// Add type definitions for our Vite runtime.
13-
"types": ["vite/client"]
12+
// Add type definitions for our Astro runtime.
13+
"types": ["astro/client"]
1414
}
1515
}

0 commit comments

Comments
 (0)