MCPcopy Create free account
hub / github.com/TanStack/query / findDeclarationFiles

Function findDeclarationFiles

packages/lit-query/scripts/write-cjs-package.mjs:28–46  ·  view source on GitHub ↗
(rootDir)

Source from the content-addressed store, hash-verified

26}
27
28async function findDeclarationFiles(rootDir) {
29 const entries = await readdir(rootDir, { withFileTypes: true })
30 const files = []
31
32 for (const entry of entries) {
33 const entryPath = resolve(rootDir, entry.name)
34
35 if (entry.isDirectory()) {
36 files.push(...(await findDeclarationFiles(entryPath)))
37 continue
38 }
39
40 if (entry.isFile() && entry.name.endsWith('.d.ts')) {
41 files.push(entryPath)
42 }
43 }
44
45 return files
46}
47
48function rewriteDeclaration(source) {
49 return source

Callers 1

Calls 1

resolveFunction · 0.85

Tested by

no test coverage detected