abiA
Denoβ€’3y ago
abi

Import from direct URL works fine, but NOT via deps.ts

// ./lib/foobar1.ts
// everything is fine
import { z } from "https://deno.land/x/zod@v3.21.4/mod.ts"
const foobar = z.string()
type Foobar1 = z.infer<typeof foobar>


...but...

// ./deps.ts
export * as zod from "https://deno.land/x/zod@v3.21.4/mod.ts"

// ./lib/foobar2.ts
import { zod } from "../deps.ts"
const { z } = zod
const foobar = z.string()  // works :)
type Foobar1 = z.infer<typeof foobar>  // Cannot find namespace 'z'.


any ideas?
Was this page helpful?