Closed koistya closed 2 years ago
@grant it works with at least the TypeScript version 4.7.1-rc
. Note that tsconfig.json/moduleResolution
needs to be set to Node16
or NodeNext
for this to work; otherwise it will work exactly as before I believe (not a breaking change).
Running into what might be a related issue with:
import { getTestServer } from '@google-cloud/functions-framework/build/src/testing'
Error: Package subpath './build/src/testing' is not defined by "exports"
This is with a fresh npx gts init
I'm still getting Cannot find module '@google-cloud/functions-framework/testing' or its corresponding type declarations.ts(2307)
with v3.1.2 when using
import { getTestServer } from '@google-cloud/functions-framework/testing'
when "moduleResolution": "node"
is set in tsconfig.json. Setting "moduleResolution": "NodeNext"
fixes it.
Ref https://github.com/microsoft/TypeScript/issues/33079