MCPcopy Create free account
hub / github.com/arktypeio/arktype / importsIn

Function importsIn

ark/aot/unplugin.ts:2344–2363  ·  view source on GitHub ↗
(
		{ dependencies, blocks }: BuiltBlock,
		isDynamic: boolean
	)

Source from the content-addressed store, hash-verified

2342 return module ? builtOf(module) : []
2343 })
2344 const importsIn = (
2345 { dependencies, blocks }: BuiltBlock,
2346 isDynamic: boolean
2347 ): BuiltImport[] => [
2348 ...dependencies.flatMap(dependency => {
2349 const module = graph.getModule(dependency as never) as
2350 | BuiltBundlerModule
2351 | null
2352 | undefined
2353 return module ?
2354 {
2355 specifier: dependency.request,
2356 named: dependency.request && unbarreled(dependency.request),
2357 isDynamic,
2358 target: builtOf(module)
2359 }
2360 : []
2361 }),
2362 ...blocks.flatMap(block => importsIn(block, true))
2363 ]
2364 for (const [module, of] of unbuilt) {
2365 const imports = importsIn(module, false)
2366 // where its file is no barrel, Next.js builds it as a re-export of

Callers 1

builtEntriesOfFunction · 0.85

Calls 2

unbarreledFunction · 0.85
builtOfFunction · 0.85

Tested by

no test coverage detected