summaryrefslogtreecommitdiff
path: root/examples/framework-react
diff options
context:
space:
mode:
authorGravatar Erika <3019731+Princesseuh@users.noreply.github.com> 2022-08-05 17:46:52 -0400
committerGravatar GitHub <noreply@github.com> 2022-08-05 17:46:52 -0400
commitc9b679e56e65f25eccb1d91b9827702cb5b82673 (patch)
treed24013dcf5fde986ca7bda7ce88867acc2dd79cd /examples/framework-react
parent69db0298d07b560992346d1a41e85afd767ee61f (diff)
downloadastro-c9b679e56e65f25eccb1d91b9827702cb5b82673.tar.gz
astro-c9b679e56e65f25eccb1d91b9827702cb5b82673.tar.zst
astro-c9b679e56e65f25eccb1d91b9827702cb5b82673.zip
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
Diffstat (limited to 'examples/framework-react')
-rw-r--r--examples/framework-react/src/env.d.ts1
-rw-r--r--examples/framework-react/tsconfig.json4
2 files changed, 3 insertions, 2 deletions
diff --git a/examples/framework-react/src/env.d.ts b/examples/framework-react/src/env.d.ts
new file mode 100644
index 000000000..f964fe0cf
--- /dev/null
+++ b/examples/framework-react/src/env.d.ts
@@ -0,0 +1 @@
+/// <reference types="astro/client" />
diff --git a/examples/framework-react/tsconfig.json b/examples/framework-react/tsconfig.json
index 4db6ee701..e9e9245fd 100644
--- a/examples/framework-react/tsconfig.json
+++ b/examples/framework-react/tsconfig.json
@@ -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
}
}