Move types to a .d.ts file inside examples projects (#4171)
* 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
This commit is contained in:
parent
69db0298d0
commit
c9b679e56e
45 changed files with 68 additions and 46 deletions
1
examples/basics/src/env.d.ts
vendored
Normal file
1
examples/basics/src/env.d.ts
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
/// <reference types="astro/client" />
|
|
@ -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
examples/blog/src/env.d.ts
vendored
Normal file
1
examples/blog/src/env.d.ts
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
/// <reference types="astro/client" />
|
|
@ -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
examples/docs/src/env.d.ts
vendored
Normal file
1
examples/docs/src/env.d.ts
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
/// <reference types="astro/client" />
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
examples/framework-alpine/src/env.d.ts
vendored
Normal file
1
examples/framework-alpine/src/env.d.ts
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
/// <reference types="astro/client" />
|
|
@ -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
examples/framework-lit/src/env.d.ts
vendored
Normal file
1
examples/framework-lit/src/env.d.ts
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
/// <reference types="astro/client" />
|
|
@ -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
examples/framework-multiple/src/env.d.ts
vendored
Normal file
1
examples/framework-multiple/src/env.d.ts
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
/// <reference types="astro/client" />
|
|
@ -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
examples/framework-preact/src/env.d.ts
vendored
Normal file
1
examples/framework-preact/src/env.d.ts
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
/// <reference types="astro/client" />
|
|
@ -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
examples/framework-react/src/env.d.ts
vendored
Normal file
1
examples/framework-react/src/env.d.ts
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
/// <reference types="astro/client" />
|
|
@ -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
examples/framework-solid/src/env.d.ts
vendored
Normal file
1
examples/framework-solid/src/env.d.ts
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
/// <reference types="astro/client" />
|
|
@ -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
examples/framework-svelte/src/env.d.ts
vendored
Normal file
1
examples/framework-svelte/src/env.d.ts
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
/// <reference types="astro/client" />
|
|
@ -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
examples/framework-vue/src/env.d.ts
vendored
Normal file
1
examples/framework-vue/src/env.d.ts
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
/// <reference types="astro/client" />
|
|
@ -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
examples/minimal/src/env.d.ts
vendored
Normal file
1
examples/minimal/src/env.d.ts
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
/// <reference types="astro/client" />
|
|
@ -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
examples/non-html-pages/src/env.d.ts
vendored
Normal file
1
examples/non-html-pages/src/env.d.ts
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
/// <reference types="astro/client" />
|
|
@ -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
examples/portfolio/src/env.d.ts
vendored
Normal file
1
examples/portfolio/src/env.d.ts
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
/// <reference types="astro/client" />
|
|
@ -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
examples/ssr/src/env.d.ts
vendored
Normal file
1
examples/ssr/src/env.d.ts
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
/// <reference types="astro/client" />
|
|
@ -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
examples/subpath/src/env.d.ts
vendored
Normal file
1
examples/subpath/src/env.d.ts
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
/// <reference types="astro/client" />
|
|
@ -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
examples/with-markdown-plugins/src/env.d.ts
vendored
Normal file
1
examples/with-markdown-plugins/src/env.d.ts
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
/// <reference types="astro/client" />
|
|
@ -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
examples/with-markdown-shiki/src/env.d.ts
vendored
Normal file
1
examples/with-markdown-shiki/src/env.d.ts
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
/// <reference types="astro/client" />
|
|
@ -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
examples/with-mdx/src/env.d.ts
vendored
Normal file
1
examples/with-mdx/src/env.d.ts
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
/// <reference types="astro/client" />
|
|
@ -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
examples/with-nanostores/src/env.d.ts
vendored
Normal file
1
examples/with-nanostores/src/env.d.ts
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
/// <reference types="astro/client" />
|
|
@ -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
examples/with-tailwindcss/src/env.d.ts
vendored
Normal file
1
examples/with-tailwindcss/src/env.d.ts
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
/// <reference types="astro/client" />
|
|
@ -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
examples/with-vite-plugin-pwa/src/env.d.ts
vendored
Normal file
1
examples/with-vite-plugin-pwa/src/env.d.ts
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
/// <reference types="astro/client" />
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue