Skip to content

Commit

Permalink
Move types to a .d.ts file inside examples projects (#4171)
Browse files Browse the repository at this point in the history
* Move types to a .d.ts file to avoid making types explicit

* Rename to proper types

* Move to proper place

* Add noEmit to tsconfig.json

* Add back removed code by accident
  • Loading branch information
Princesseuh authored Aug 5, 2022
1 parent 69db029 commit c9b679e
Show file tree
Hide file tree
Showing 45 changed files with 68 additions and 46 deletions.
1 change: 1 addition & 0 deletions examples/basics/src/env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/// <reference types="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 Astro runtime.
"types": ["astro/client"]
// Astro will directly run your TypeScript code, no transpilation needed.
"noEmit": true
}
}
1 change: 1 addition & 0 deletions examples/blog/src/env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/// <reference 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 Astro runtime.
"types": ["astro/client"]
// Astro will directly run your TypeScript code, no transpilation needed.
"noEmit": true
}
}
1 change: 1 addition & 0 deletions examples/docs/src/env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/// <reference 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 Astro runtime.
"types": ["astro/client"]
// Astro will directly run your TypeScript code, no transpilation needed.
"noEmit": true
}
}
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 Astro runtime.
"types": ["astro/client"]
// Astro will directly run your TypeScript code, no transpilation needed.
"noEmit": true
}
}
1 change: 1 addition & 0 deletions examples/framework-alpine/src/env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/// <reference 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 Astro runtime.
"types": ["astro/client"]
// Astro will directly run your TypeScript code, no transpilation needed.
"noEmit": true
}
}
1 change: 1 addition & 0 deletions examples/framework-lit/src/env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/// <reference 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 Astro runtime.
"types": ["astro/client"]
// Astro will directly run your TypeScript code, no transpilation needed.
"noEmit": true
}
}
1 change: 1 addition & 0 deletions examples/framework-multiple/src/env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/// <reference 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 @@ -11,7 +11,7 @@
"resolveJsonModule": true,
// Enable stricter transpilation for better output.
"isolatedModules": true,
// Add type definitions for our Astro runtime.
"types": ["astro/client"]
// Astro will directly run your TypeScript code, no transpilation needed.
"noEmit": true
}
}
1 change: 1 addition & 0 deletions examples/framework-preact/src/env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/// <reference 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 Astro runtime.
"types": ["astro/client"]
// Astro will directly run your TypeScript code, no transpilation needed.
"noEmit": true
}
}
1 change: 1 addition & 0 deletions examples/framework-react/src/env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/// <reference 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 Astro runtime.
"types": ["astro/client"]
// Astro will directly run your TypeScript code, no transpilation needed.
"noEmit": true
}
}
1 change: 1 addition & 0 deletions examples/framework-solid/src/env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/// <reference 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 Astro runtime.
"types": ["astro/client"]
// Astro will directly run your TypeScript code, no transpilation needed.
"noEmit": true
}
}
1 change: 1 addition & 0 deletions examples/framework-svelte/src/env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/// <reference 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 Astro runtime.
"types": ["astro/client"]
// Astro will directly run your TypeScript code, no transpilation needed.
"noEmit": true
}
}
1 change: 1 addition & 0 deletions examples/framework-vue/src/env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/// <reference 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 @@ -11,7 +11,7 @@
"resolveJsonModule": true,
// Enable stricter transpilation for better output.
"isolatedModules": true,
// Add type definitions for our Astro runtime.
"types": ["astro/client"]
// Astro will directly run your TypeScript code, no transpilation needed.
"noEmit": true
}
}
1 change: 1 addition & 0 deletions examples/minimal/src/env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/// <reference 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 Astro runtime.
"types": ["astro/client"]
// Astro will directly run your TypeScript code, no transpilation needed.
"noEmit": true
}
}
1 change: 1 addition & 0 deletions examples/non-html-pages/src/env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/// <reference 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 Astro runtime.
"types": ["astro/client"]
// Astro will directly run your TypeScript code, no transpilation needed.
"noEmit": true
}
}
1 change: 1 addition & 0 deletions examples/portfolio/src/env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/// <reference 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 Astro runtime.
"types": ["astro/client"]
// Astro will directly run your TypeScript code, no transpilation needed.
"noEmit": true
}
}
1 change: 1 addition & 0 deletions examples/ssr/src/env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/// <reference 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 Astro runtime.
"types": ["astro/client"]
// Astro will directly run your TypeScript code, no transpilation needed.
"noEmit": true
}
}
1 change: 1 addition & 0 deletions examples/subpath/src/env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/// <reference 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 Astro runtime.
"types": ["astro/client"]
// Astro will directly run your TypeScript code, no transpilation needed.
"noEmit": true
}
}
1 change: 1 addition & 0 deletions examples/with-markdown-plugins/src/env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/// <reference 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 Astro runtime.
"types": ["astro/client"]
// Astro will directly run your TypeScript code, no transpilation needed.
"noEmit": true
}
}
1 change: 1 addition & 0 deletions examples/with-markdown-shiki/src/env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/// <reference 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 Astro runtime.
"types": ["astro/client"]
// Astro will directly run your TypeScript code, no transpilation needed.
"noEmit": true
}
}
1 change: 1 addition & 0 deletions examples/with-mdx/src/env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/// <reference 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 Astro runtime.
"types": ["astro/client"]
// Astro will directly run your TypeScript code, no transpilation needed.
"noEmit": true
}
}
1 change: 1 addition & 0 deletions examples/with-nanostores/src/env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/// <reference 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 Astro runtime.
"types": ["astro/client"]
// Astro will directly run your TypeScript code, no transpilation needed.
"noEmit": true
}
}
1 change: 1 addition & 0 deletions examples/with-tailwindcss/src/env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/// <reference 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 Astro runtime.
"types": ["astro/client"]
// Astro will directly run your TypeScript code, no transpilation needed.
"noEmit": true
}
}
1 change: 1 addition & 0 deletions examples/with-vite-plugin-pwa/src/env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/// <reference 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 Astro runtime.
"types": ["astro/client"]
// Astro will directly run your TypeScript code, no transpilation needed.
"noEmit": true
}
}

0 comments on commit c9b679e

Please sign in to comment.