following official deno express tutorial leads to type errors
Hii, following this: https://docs.deno.com/examples/express_tutorial/ gives me type errors with deno version 2.6.2. Cloning the given example repo leads to:
Can someone confirmed this? Did I break my setup? What do I do to fix it? I'm facing the same/similar issues in my pet project.
$ deno check
Check main.ts
Check main_test.ts
TS7006 [ERROR]: Parameter 'req' implicitly has an 'any' type.
app.get("/", (req, res) => {
~~~
at file:///home/cem/Projects/tutorial-with-express/main.ts:9:15
TS7006 [ERROR]: Parameter 'res' implicitly has an 'any' type.
app.get("/", (req, res) => {
~~~
at file:///home/cem/Projects/tutorial-with-express/main.ts:9:20
TS7006 [ERROR]: Parameter 'req' implicitly has an 'any' type.
app.get("/api", (req, res) => {
~~~
at file:///home/cem/Projects/tutorial-with-express/main.ts:13:18
TS7006 [ERROR]: Parameter 'res' implicitly has an 'any' type.
app.get("/api", (req, res) => {
~~~
at file:///home/cem/Projects/tutorial-with-express/main.ts:13:23
TS7006 [ERROR]: Parameter 'req' implicitly has an 'any' type.
app.get("/api/:dinosaur", (req, res) => {
~~~
at file:///home/cem/Projects/tutorial-with-express/main.ts:17:28
TS7006 [ERROR]: Parameter 'res' implicitly has an 'any' type.
app.get("/api/:dinosaur", (req, res) => {
~~~
at file:///home/cem/Projects/tutorial-with-express/main.ts:17:33
TS2305 [ERROR]: Module '"file:///home/cem/Projects/tutorial-with-express/main.ts"' has no exported member 'add'.
import { add } from "./main.ts";
~~~
at file:///home/cem/Projects/tutorial-with-express/main_test.ts:2:10
Found 7 errors.
error: Type checking failed.$ deno check
Check main.ts
Check main_test.ts
TS7006 [ERROR]: Parameter 'req' implicitly has an 'any' type.
app.get("/", (req, res) => {
~~~
at file:///home/cem/Projects/tutorial-with-express/main.ts:9:15
TS7006 [ERROR]: Parameter 'res' implicitly has an 'any' type.
app.get("/", (req, res) => {
~~~
at file:///home/cem/Projects/tutorial-with-express/main.ts:9:20
TS7006 [ERROR]: Parameter 'req' implicitly has an 'any' type.
app.get("/api", (req, res) => {
~~~
at file:///home/cem/Projects/tutorial-with-express/main.ts:13:18
TS7006 [ERROR]: Parameter 'res' implicitly has an 'any' type.
app.get("/api", (req, res) => {
~~~
at file:///home/cem/Projects/tutorial-with-express/main.ts:13:23
TS7006 [ERROR]: Parameter 'req' implicitly has an 'any' type.
app.get("/api/:dinosaur", (req, res) => {
~~~
at file:///home/cem/Projects/tutorial-with-express/main.ts:17:28
TS7006 [ERROR]: Parameter 'res' implicitly has an 'any' type.
app.get("/api/:dinosaur", (req, res) => {
~~~
at file:///home/cem/Projects/tutorial-with-express/main.ts:17:33
TS2305 [ERROR]: Module '"file:///home/cem/Projects/tutorial-with-express/main.ts"' has no exported member 'add'.
import { add } from "./main.ts";
~~~
at file:///home/cem/Projects/tutorial-with-express/main_test.ts:2:10
Found 7 errors.
error: Type checking failed.Can someone confirmed this? Did I break my setup? What do I do to fix it? I'm facing the same/similar issues in my pet project.
