The moment I starting writing my test, and did this by adding import { makeEdgeEnv } from 'edge-mock' as first line to my initial test, this TS error started popping out.
I can silence the error by either of:
a) Commenting out import { makeEdgeEnv } from 'edge-mock' (which I sure don't wan't to do);
b) Commenting out "tests/*.ts" from tsconfig.json's include values (which I'm not sure I want to do);
Either a) or b) brings back expected typings:
Maybe it's just b) - I am supposed to exclude tests from "include" in tsconfig.json. Maybe it's edge-mock not (yet) supporting Modules syntax. Or maybe anything else that my limited knowledge/expertise does not allow me to identify, that causes this TS error.
Kindly please feel free to instantly close this issue if that's an expected behaviour. Thanks!
Starting using edge-mock in one of the projects. Enjoying it much.
I came across and odd situation, which might be totally expected, but I felt like reporting it as potential issue nonetheless.
I was successfully using
ModuleWorker
typings from https://github.com/cloudflare/workers-types/blob/feat/module-worker/index.d.ts#L734 (installed@cloudflare/workers-types
from git branch).The moment I starting writing my test, and did this by adding
import { makeEdgeEnv } from 'edge-mock'
as first line to my initial test, this TS error started popping out.I can silence the error by either of: a) Commenting out
import { makeEdgeEnv } from 'edge-mock'
(which I sure don't wan't to do); b) Commenting out"tests/*.ts"
from tsconfig.json'sinclude
values (which I'm not sure I want to do);Either
a)
orb)
brings back expected typings:Maybe it's just
b)
- I am supposed to exclude tests from "include" in tsconfig.json. Maybe it's edge-mock not (yet) supporting Modules syntax. Or maybe anything else that my limited knowledge/expertise does not allow me to identify, that causes this TS error.Kindly please feel free to instantly close this issue if that's an expected behaviour. Thanks!