Skip to content

Commit

Permalink
Move client types into Astro (#3851)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
matthewp authored Jul 11, 2022
1 parent 16fdc01 commit 21869a6
Show file tree
Hide file tree
Showing 34 changed files with 272 additions and 57 deletions.
5 changes: 5 additions & 0 deletions .changeset/healthy-poems-know.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Replaces vite/client types with astro/client
4 changes: 2 additions & 2 deletions examples/basics/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"resolveJsonModule": true,
// Enable stricter transpilation for better output.
"isolatedModules": true,
// Add type definitions for our Vite runtime.
"types": ["vite/client"]
// Add type definitions for our Astro runtime.
"types": ["astro/client"]
}
}
4 changes: 2 additions & 2 deletions examples/blog-multiple-authors/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"resolveJsonModule": true,
// Enable stricter transpilation for better output.
"isolatedModules": true,
// Add type definitions for our Vite runtime.
"types": ["vite/client"]
// Add type definitions for our Astro runtime.
"types": ["astro/client"]
}
}
4 changes: 2 additions & 2 deletions examples/blog/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"resolveJsonModule": true,
// Enable stricter transpilation for better output.
"isolatedModules": true,
// Add type definitions for our Vite runtime.
"types": ["vite/client"]
// Add type definitions for our Astro runtime.
"types": ["astro/client"]
}
}
4 changes: 2 additions & 2 deletions examples/docs/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"resolveJsonModule": true,
// Enable stricter transpilation for better output.
"isolatedModules": true,
// Add type definitions for our Vite runtime.
"types": ["vite/client"]
// Add type definitions for our Astro runtime.
"types": ["astro/client"]
}
}
2 changes: 1 addition & 1 deletion examples/env-vars/src/env.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/// <reference types="vite/client" />
/// <reference types="astro/client" />

interface ImportMetaEnv {
readonly DB_PASSWORD: string;
Expand Down
4 changes: 2 additions & 2 deletions examples/env-vars/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"resolveJsonModule": true,
// Enable stricter transpilation for better output.
"isolatedModules": true,
// Add type definitions for our Vite runtime.
"types": ["vite/client"]
// Add type definitions for our Astro runtime.
"types": ["astro/client"]
}
}
4 changes: 2 additions & 2 deletions examples/framework-alpine/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"resolveJsonModule": true,
// Enable stricter transpilation for better output.
"isolatedModules": true,
// Add type definitions for our Vite runtime.
"types": ["vite/client"]
// Add type definitions for our Astro runtime.
"types": ["astro/client"]
}
}
4 changes: 2 additions & 2 deletions examples/framework-lit/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"resolveJsonModule": true,
// Enable stricter transpilation for better output.
"isolatedModules": true,
// Add type definitions for our Vite runtime.
"types": ["vite/client"]
// Add type definitions for our Astro runtime.
"types": ["astro/client"]
}
}
4 changes: 2 additions & 2 deletions examples/framework-multiple/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"resolveJsonModule": true,
// Enable stricter transpilation for better output.
"isolatedModules": true,
// Add type definitions for our Vite runtime.
"types": ["vite/client"]
// Add type definitions for our Astro runtime.
"types": ["astro/client"]
}
}
4 changes: 2 additions & 2 deletions examples/framework-preact/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"resolveJsonModule": true,
// Enable stricter transpilation for better output.
"isolatedModules": true,
// Add type definitions for our Vite runtime.
"types": ["vite/client"]
// Add type definitions for our Astro runtime.
"types": ["astro/client"]
}
}
4 changes: 2 additions & 2 deletions examples/framework-react/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"resolveJsonModule": true,
// Enable stricter transpilation for better output.
"isolatedModules": true,
// Add type definitions for our Vite runtime.
"types": ["vite/client"]
// Add type definitions for our Astro runtime.
"types": ["astro/client"]
}
}
4 changes: 2 additions & 2 deletions examples/framework-solid/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"resolveJsonModule": true,
// Enable stricter transpilation for better output.
"isolatedModules": true,
// Add type definitions for our Vite runtime.
"types": ["vite/client"]
// Add type definitions for our Astro runtime.
"types": ["astro/client"]
}
}
4 changes: 2 additions & 2 deletions examples/framework-svelte/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"resolveJsonModule": true,
// Enable stricter transpilation for better output.
"isolatedModules": true,
// Add type definitions for our Vite runtime.
"types": ["vite/client"]
// Add type definitions for our Astro runtime.
"types": ["astro/client"]
}
}
4 changes: 2 additions & 2 deletions examples/framework-vue/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"resolveJsonModule": true,
// Enable stricter transpilation for better output.
"isolatedModules": true,
// Add type definitions for our Vite runtime.
"types": ["vite/client"]
// Add type definitions for our Astro runtime.
"types": ["astro/client"]
}
}
4 changes: 2 additions & 2 deletions examples/integrations-playground/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"resolveJsonModule": true,
// Enable stricter transpilation for better output.
"isolatedModules": true,
// Add type definitions for our Vite runtime.
"types": ["vite/client"]
// Add type definitions for our Astro runtime.
"types": ["astro/client"]
}
}
4 changes: 2 additions & 2 deletions examples/minimal/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"resolveJsonModule": true,
// Enable stricter transpilation for better output.
"isolatedModules": true,
// Add type definitions for our Vite runtime.
"types": ["vite/client"]
// Add type definitions for our Astro runtime.
"types": ["astro/client"]
}
}
4 changes: 2 additions & 2 deletions examples/non-html-pages/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"resolveJsonModule": true,
// Enable stricter transpilation for better output.
"isolatedModules": true,
// Add type definitions for our Vite runtime.
"types": ["vite/client"]
// Add type definitions for our Astro runtime.
"types": ["astro/client"]
}
}
4 changes: 2 additions & 2 deletions examples/portfolio/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"resolveJsonModule": true,
// Enable stricter transpilation for better output.
"isolatedModules": true,
// Add type definitions for our Vite runtime.
"types": ["vite/client"]
// Add type definitions for our Astro runtime.
"types": ["astro/client"]
}
}
4 changes: 2 additions & 2 deletions examples/ssr/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"resolveJsonModule": true,
// Enable stricter transpilation for better output.
"isolatedModules": true,
// Add type definitions for our Vite runtime.
"types": ["vite/client"]
// Add type definitions for our Astro runtime.
"types": ["astro/client"]
}
}
4 changes: 2 additions & 2 deletions examples/starter/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"resolveJsonModule": true,
// Enable stricter transpilation for better output.
"isolatedModules": true,
// Add type definitions for our Vite runtime.
"types": ["vite/client"]
// Add type definitions for our Astro runtime.
"types": ["astro/client"]
}
}
4 changes: 2 additions & 2 deletions examples/subpath/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"resolveJsonModule": true,
// Enable stricter transpilation for better output.
"isolatedModules": true,
// Add type definitions for our Vite runtime.
"types": ["vite/client"]
// Add type definitions for our Astro runtime.
"types": ["astro/client"]
}
}
4 changes: 2 additions & 2 deletions examples/with-markdown-plugins/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"resolveJsonModule": true,
// Enable stricter transpilation for better output.
"isolatedModules": true,
// Add type definitions for our Vite runtime.
"types": ["vite/client"]
// Add type definitions for our Astro runtime.
"types": ["astro/client"]
}
}
4 changes: 2 additions & 2 deletions examples/with-markdown-shiki/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"resolveJsonModule": true,
// Enable stricter transpilation for better output.
"isolatedModules": true,
// Add type definitions for our Vite runtime.
"types": ["vite/client"]
// Add type definitions for our Astro runtime.
"types": ["astro/client"]
}
}
4 changes: 2 additions & 2 deletions examples/with-markdown/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"resolveJsonModule": true,
// Enable stricter transpilation for better output.
"isolatedModules": true,
// Add type definitions for our Vite runtime.
"types": ["vite/client"]
// Add type definitions for our Astro runtime.
"types": ["astro/client"]
}
}
4 changes: 2 additions & 2 deletions examples/with-mdx/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"resolveJsonModule": true,
// Enable stricter transpilation for better output.
"isolatedModules": true,
// Add type definitions for our Vite runtime.
"types": ["vite/client"]
// Add type definitions for our Astro runtime.
"types": ["astro/client"]
}
}
4 changes: 2 additions & 2 deletions examples/with-nanostores/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"resolveJsonModule": true,
// Enable stricter transpilation for better output.
"isolatedModules": true,
// Add type definitions for our Vite runtime.
"types": ["vite/client"]
// Add type definitions for our Astro runtime.
"types": ["astro/client"]
}
}
4 changes: 2 additions & 2 deletions examples/with-tailwindcss/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"resolveJsonModule": true,
// Enable stricter transpilation for better output.
"isolatedModules": true,
// Add type definitions for our Vite runtime.
"types": ["vite/client"]
// Add type definitions for our Astro runtime.
"types": ["astro/client"]
}
}
4 changes: 2 additions & 2 deletions examples/with-vite-plugin-pwa/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"resolveJsonModule": true,
// Enable stricter transpilation for better output.
"isolatedModules": true,
// Add type definitions for our Vite runtime.
"types": ["vite/client"]
// Add type definitions for our Astro runtime.
"types": ["astro/client"]
}
}
Loading

0 comments on commit 21869a6

Please sign in to comment.