@dtsx/dtsx 0.11.52 → 0.11.54
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/cli.js +1 -1
- package/dist/{chunk-j0y149qx.js → chunk-0d5nemtn.js} +2 -2
- package/dist/{chunk-3z75j224.js → chunk-0gy70m6b.js} +2 -2
- package/dist/{chunk-p99myphf.js → chunk-0xjw2vdt.js} +2 -2
- package/dist/{chunk-dq0nmept.js → chunk-15qy51py.js} +2 -2
- package/dist/{chunk-vekg5zy6.js → chunk-193aw7d6.js} +1 -1
- package/dist/{chunk-m8w98p7p.js → chunk-1k5r7bpf.js} +3 -3
- package/dist/{chunk-e29deb0h.js → chunk-1mzxq1rg.js} +2 -2
- package/dist/{chunk-4sasxrdr.js → chunk-1t77gtcx.js} +2 -2
- package/dist/{chunk-6e5dyfx2.js → chunk-2q4d5dqw.js} +4 -4
- package/dist/{chunk-x67zh0tr.js → chunk-365k5pgj.js} +2 -2
- package/dist/{chunk-cq5zpg9c.js → chunk-3d49h0bx.js} +2 -2
- package/dist/{chunk-90jwk3zy.js → chunk-4rsk49xj.js} +2 -2
- package/dist/{chunk-02yqpwv0.js → chunk-6b6rt0yh.js} +2 -2
- package/dist/{chunk-g2191y9b.js → chunk-6c8nk9rm.js} +4 -4
- package/dist/{chunk-013mp499.js → chunk-6ekemc3h.js} +2 -2
- package/dist/{chunk-m9b6cqn7.js → chunk-6j4wx5mf.js} +17 -17
- package/dist/{chunk-n0tw6p7g.js → chunk-6r01zgys.js} +1 -1
- package/dist/{chunk-jkeqyj50.js → chunk-6sdswv08.js} +2 -2
- package/dist/chunk-6y728pph.js +3 -0
- package/dist/{chunk-k0exaspt.js → chunk-7dmn623d.js} +3 -3
- package/dist/{chunk-290jpwny.js → chunk-7pw9ayve.js} +3 -3
- package/dist/{chunk-czgjmefa.js → chunk-87mk4nnk.js} +4 -4
- package/dist/{chunk-7ryea8wn.js → chunk-8apqea4x.js} +2 -2
- package/dist/{chunk-4kv50gfv.js → chunk-8r7rmcz7.js} +5 -5
- package/dist/{chunk-3mp0jaa7.js → chunk-8vvryt8p.js} +2 -2
- package/dist/{chunk-anr9ncep.js → chunk-990m77vr.js} +2 -2
- package/dist/{chunk-5cgpcdsb.js → chunk-9bj73ygx.js} +3 -3
- package/dist/{chunk-9wxhpnya.js → chunk-9gdtzkjv.js} +2 -2
- package/dist/{chunk-zpvcnc7c.js → chunk-9mdgtq38.js} +2 -2
- package/dist/{chunk-kf4sza0n.js → chunk-9xvmk7pg.js} +4 -4
- package/dist/{chunk-sbmdk35p.js → chunk-aw6spwvp.js} +2 -2
- package/dist/{chunk-xsaw8abt.js → chunk-btcj8fgc.js} +3 -3
- package/dist/chunk-bys9tn88.js +3 -0
- package/dist/{chunk-fjkswqq2.js → chunk-cdq514ff.js} +1 -1
- package/dist/{chunk-dc0059dr.js → chunk-cp8xdvb6.js} +3 -3
- package/dist/{chunk-cx4rq49z.js → chunk-d6cwtv8p.js} +2 -2
- package/dist/{chunk-a0900w7b.js → chunk-dak0dhnx.js} +2 -2
- package/dist/{chunk-4xvx77zs.js → chunk-egmen4qn.js} +5 -5
- package/dist/{chunk-kcfc6zg6.js → chunk-fpa2ea8k.js} +3 -3
- package/dist/{chunk-t4cdpfrr.js → chunk-g3737b7k.js} +1 -1
- package/dist/{chunk-bkrftw1s.js → chunk-g743tp4d.js} +5 -5
- package/dist/{chunk-b7g1pyea.js → chunk-gdzqt46g.js} +4 -4
- package/dist/{chunk-7xgwvv94.js → chunk-geqq4mmz.js} +2 -2
- package/dist/{chunk-cyzr3xat.js → chunk-gwa4hmfa.js} +2 -2
- package/dist/{chunk-e4f5kxrh.js → chunk-h28vzayq.js} +2 -2
- package/dist/{chunk-1jmwmc2a.js → chunk-h6ddkhyq.js} +2 -2
- package/dist/{chunk-xph91r7p.js → chunk-h7nk8ywf.js} +3 -3
- package/dist/{chunk-taa77k3y.js → chunk-hbmnkmzb.js} +3 -3
- package/dist/{chunk-w60gzzxc.js → chunk-heqx5083.js} +4 -4
- package/dist/{chunk-r9gdz351.js → chunk-hkcqbex1.js} +2 -2
- package/dist/{chunk-9b0jah2a.js → chunk-j4w3zxc1.js} +2 -2
- package/dist/{chunk-937czex4.js → chunk-j67chb8m.js} +2 -2
- package/dist/{chunk-0v6vmemf.js → chunk-j7rpp55s.js} +3 -3
- package/dist/{chunk-1z9550gn.js → chunk-k8tnz2qd.js} +8 -8
- package/dist/{chunk-1y19tmb0.js → chunk-kkshxyex.js} +3 -3
- package/dist/{chunk-g9kqk7y0.js → chunk-mph001z4.js} +4 -4
- package/dist/{chunk-jwcw24cc.js → chunk-mqv5m22t.js} +4 -4
- package/dist/{chunk-9kfzjkd1.js → chunk-msa98cgm.js} +10 -10
- package/dist/{chunk-2q641ekp.js → chunk-mzxxgnp8.js} +1 -1
- package/dist/chunk-na7saw10.js +2 -0
- package/dist/{chunk-ktt2m4eh.js → chunk-nmht3krt.js} +3 -3
- package/dist/{chunk-dhzr60ge.js → chunk-nnayqrp5.js} +2 -2
- package/dist/{chunk-s6bjmr93.js → chunk-pggbb1c0.js} +2 -2
- package/dist/{chunk-xm63aee8.js → chunk-pnfjhm01.js} +2 -2
- package/dist/{chunk-8gksa73c.js → chunk-qbk49jz5.js} +3 -3
- package/dist/{chunk-19626hwq.js → chunk-r0mj8ky4.js} +2 -2
- package/dist/{chunk-m7jndt3v.js → chunk-rc1zpm7f.js} +3 -3
- package/dist/{chunk-5mh2gqd4.js → chunk-rymbw083.js} +2 -2
- package/dist/{chunk-s9e2a0t7.js → chunk-spdw3tc0.js} +2 -2
- package/dist/{chunk-6ekgn7sc.js → chunk-t5nmnzy6.js} +2 -2
- package/dist/{chunk-bsj770f8.js → chunk-tgaear7n.js} +4 -4
- package/dist/{chunk-rwdcmcx3.js → chunk-v22xpr7j.js} +3 -3
- package/dist/{chunk-bj3r4j0a.js → chunk-wvdy228e.js} +4 -4
- package/dist/{chunk-b6xcyrnx.js → chunk-x569v6av.js} +3 -3
- package/dist/{chunk-asws39qs.js → chunk-xn7p8w2c.js} +10 -10
- package/dist/{chunk-4nrrjn7g.js → chunk-ywff3fq9.js} +11 -11
- package/dist/{chunk-3e6q952c.js → chunk-z6amkx8m.js} +6 -6
- package/dist/{chunk-5ym0xgg0.js → chunk-zp7a7th9.js} +2 -2
- package/dist/src/augmentation-graph.js +1 -1
- package/dist/src/binding-patterns.js +1 -1
- package/dist/src/branded-types.js +1 -1
- package/dist/src/bundle-linker.js +1 -1
- package/dist/src/bundler.js +1 -1
- package/dist/src/cache.js +1 -1
- package/dist/src/call-signatures.js +1 -1
- package/dist/src/circular.js +1 -1
- package/dist/src/compat.js +1 -1
- package/dist/src/computed-keys.js +1 -1
- package/dist/src/config.js +1 -1
- package/dist/src/dangling-refs.js +1 -1
- package/dist/src/declaration-project.js +1 -1
- package/dist/src/declaration-publication.js +1 -1
- package/dist/src/declaration-references.js +1 -1
- package/dist/src/diff.js +1 -1
- package/dist/src/docs.js +1 -1
- package/dist/src/enum-declarations.js +1 -1
- package/dist/src/errors.js +1 -1
- package/dist/src/extractor/directives.js +1 -1
- package/dist/src/extractor/extract.js +1 -1
- package/dist/src/extractor/scanner.js +1 -1
- package/dist/src/extractor.js +1 -1
- package/dist/src/formats.js +1 -1
- package/dist/src/formatter.js +1 -1
- package/dist/src/function-properties.js +1 -1
- package/dist/src/generator.js +1 -1
- package/dist/src/global-types.js +1 -1
- package/dist/src/import-sorter.js +1 -1
- package/dist/src/incremental.js +1 -1
- package/dist/src/index.js +1 -1
- package/dist/src/inferred-imports.js +1 -1
- package/dist/src/initializer-type-spans.js +1 -1
- package/dist/src/logger.js +1 -1
- package/dist/src/lsp.js +1 -1
- package/dist/src/memory.js +1 -1
- package/dist/src/merger.js +1 -1
- package/dist/src/module-graph.js +1 -1
- package/dist/src/module-references.js +1 -1
- package/dist/src/native-checker.js +1 -1
- package/dist/src/native-engine.js +1 -1
- package/dist/src/native-extractor.js +1 -1
- package/dist/src/native-generation.js +1 -1
- package/dist/src/native-project.js +1 -1
- package/dist/src/optimizer.js +1 -1
- package/dist/src/output-normalizer.js +1 -1
- package/dist/src/parallel-processor.js +1 -1
- package/dist/src/parameters.js +1 -1
- package/dist/src/parser.js +1 -1
- package/dist/src/plugins/bun.js +1 -1
- package/dist/src/plugins/esbuild.js +1 -1
- package/dist/src/plugins/index.js +1 -1
- package/dist/src/plugins/tsdown.js +1 -1
- package/dist/src/plugins/tsup.js +1 -1
- package/dist/src/plugins/vite.js +1 -1
- package/dist/src/plugins/webpack.js +1 -1
- package/dist/src/plugins.js +1 -1
- package/dist/src/process-source.js +1 -1
- package/dist/src/processor/cache.js +1 -1
- package/dist/src/processor/declarations.js +1 -1
- package/dist/src/processor/import-usage.js +1 -1
- package/dist/src/processor/imports.js +1 -1
- package/dist/src/processor/index.js +1 -1
- package/dist/src/processor/type-inference.js +1 -1
- package/dist/src/processor.js +1 -1
- package/dist/src/profiling.js +1 -1
- package/dist/src/return-type-scope.js +1 -1
- package/dist/src/security.js +1 -1
- package/dist/src/source-cache.js +1 -1
- package/dist/src/sourcemap.js +1 -1
- package/dist/src/stx.js +1 -1
- package/dist/src/tracking.js +1 -1
- package/dist/src/transformers.js +1 -1
- package/dist/src/tree-shaker.js +1 -1
- package/dist/src/type-mappings.js +1 -1
- package/dist/src/utils.js +1 -1
- package/dist/src/value-inference.d.ts +2 -0
- package/dist/src/value-inference.js +1 -1
- package/dist/src/vue.js +1 -1
- package/dist/src/watcher.js +1 -1
- package/dist/src/worker-thread.js +1 -1
- package/dist/src/worker.js +1 -1
- package/dist/src/workspace.js +1 -1
- package/native/darwin-arm64/libzig-dtsx.dylib +0 -0
- package/native/darwin-x64/libzig-dtsx.dylib +0 -0
- package/native/freebsd-x64/libzig-dtsx.so +0 -0
- package/native/linux-arm64/libzig-dtsx.so +0 -0
- package/native/linux-x64/libzig-dtsx.so +0 -0
- package/native/windows-x64/zig-dtsx.dll +0 -0
- package/package.json +4 -4
- package/dist/chunk-a04yhmwb.js +0 -3
- package/dist/chunk-nrb601nx.js +0 -2
- package/dist/chunk-zbrj37wa.js +0 -3
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{He,
|
|
2
|
+
import{He,Jt,fr,Aa}from"../../chunk-rymbw083.js";import"../../chunk-egmen4qn.js";import"../../chunk-spdw3tc0.js";import"../../chunk-msa98cgm.js";import"../../chunk-d6cwtv8p.js";import"../../chunk-6sdswv08.js";import"../../chunk-pnfjhm01.js";import"../../chunk-tgaear7n.js";import"../../chunk-h6ddkhyq.js";import"../../chunk-193aw7d6.js";import"../../chunk-dak0dhnx.js";import"../../chunk-x569v6av.js";import"../../chunk-hgg4aqvf.js";import"../../chunk-87mk4nnk.js";import"../../chunk-0d5nemtn.js";import"../../chunk-v22xpr7j.js";import"../../chunk-nnayqrp5.js";import"../../chunk-geqq4mmz.js";import"../../chunk-7pw9ayve.js";import"../../chunk-1k5r7bpf.js";import"../../chunk-j4w3zxc1.js";import"../../chunk-g3737b7k.js";import"../../chunk-rc1zpm7f.js";import"../../chunk-1t77gtcx.js";import"../../chunk-x6ddycvm.js";import"../../chunk-g9emajpc.js";import"../../chunk-6b6rt0yh.js";import"../../chunk-8vvryt8p.js";import"../../chunk-bys9tn88.js";import"../../chunk-3d49h0bx.js";import"../../chunk-fpa2ea8k.js";import"../../chunk-qbk49jz5.js";import"../../chunk-j67chb8m.js";import"../../chunk-srfpcjtn.js";import"../../chunk-v6fwy63g.js";import"../../chunk-6j4wx5mf.js";import"../../chunk-0gy70m6b.js";import"../../chunk-h28vzayq.js";import"../../chunk-g743tp4d.js";import"../../chunk-6y728pph.js";import"../../chunk-9mdgtq38.js";import"../../chunk-6ekemc3h.js";import"../../chunk-aw6spwvp.js";import"../../chunk-ywff3fq9.js";import"../../chunk-587w6ktw.js";import"../../chunk-hkcqbex1.js";import"../../chunk-cdq514ff.js";import"../../chunk-vk5r6pgx.js";import"../../chunk-6r01zgys.js";import"../../chunk-gwa4hmfa.js";import"../../chunk-mzxxgnp8.js";import"../../chunk-t5nmnzy6.js";import"../../chunk-cgqg1br8.js";export{He as DtsxWebpackPlugin,Aa as default,fr as dts,Jt as dtsxWebpack};
|
package/dist/src/plugins.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Ae,
|
|
2
|
+
import{Ae,ta,se,na,ra,ia}from"../chunk-7pw9ayve.js";export{Ae as PluginManager,ra as createBannerPlugin,ia as createFilterPlugin,se as definePlugin,ta as pluginManager,na as stripInternalPlugin};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Ze,$t,
|
|
2
|
+
import{Ze,$t,ci,li,ui,Ba,kn}from"../chunk-d6cwtv8p.js";import"../chunk-6sdswv08.js";import"../chunk-pnfjhm01.js";import"../chunk-dak0dhnx.js";import"../chunk-g3737b7k.js";import"../chunk-3d49h0bx.js";import"../chunk-fpa2ea8k.js";import"../chunk-qbk49jz5.js";import"../chunk-v6fwy63g.js";import"../chunk-6j4wx5mf.js";import"../chunk-0gy70m6b.js";import"../chunk-h28vzayq.js";import"../chunk-g743tp4d.js";import"../chunk-6y728pph.js";import"../chunk-9mdgtq38.js";import"../chunk-6ekemc3h.js";import"../chunk-aw6spwvp.js";import"../chunk-ywff3fq9.js";import"../chunk-587w6ktw.js";import"../chunk-hkcqbex1.js";import"../chunk-cdq514ff.js";import"../chunk-vk5r6pgx.js";import"../chunk-6r01zgys.js";import"../chunk-gwa4hmfa.js";import"../chunk-mzxxgnp8.js";import"../chunk-t5nmnzy6.js";import"../chunk-cgqg1br8.js";export{ui as clearResultCache,Ze as emitNatively,$t as processSource,Ba as processSourceDirect,ci as processSourceIsolated,li as processSourceSemantic,kn as processSourceWithTypeScriptEngine};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Va,Zn,Qn,er}from"../../chunk-6ekemc3h.js";export{er as clearProcessorCaches,Va as getCachedRegex,Zn as getImportItemsFromCache,Qn as setImportItemsCache};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{fe,x,de,pe,me,ge,
|
|
2
|
+
import{fe,x,de,pe,me,ge,qn,Jn,he}from"../../chunk-g743tp4d.js";import"../../chunk-ywff3fq9.js";import"../../chunk-587w6ktw.js";import"../../chunk-hkcqbex1.js";import"../../chunk-cdq514ff.js";import"../../chunk-vk5r6pgx.js";import"../../chunk-6r01zgys.js";import"../../chunk-gwa4hmfa.js";import"../../chunk-t5nmnzy6.js";import"../../chunk-cgqg1br8.js";export{me as processClassDeclaration,ge as processEnumDeclaration,Jn as processExportDeclaration,fe as processFunctionDeclaration,qn as processImportDeclaration,de as processInterfaceDeclaration,he as processModuleDeclaration,pe as processTypeDeclaration,x as processVariableDeclaration};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Me}from"../../chunk-
|
|
2
|
+
import{Me}from"../../chunk-g3737b7k.js";import"../../chunk-g743tp4d.js";import"../../chunk-9mdgtq38.js";import"../../chunk-6ekemc3h.js";import"../../chunk-ywff3fq9.js";import"../../chunk-587w6ktw.js";import"../../chunk-hkcqbex1.js";import"../../chunk-cdq514ff.js";import"../../chunk-vk5r6pgx.js";import"../../chunk-6r01zgys.js";import"../../chunk-gwa4hmfa.js";import"../../chunk-t5nmnzy6.js";import"../../chunk-cgqg1br8.js";export{Me as analyzeDeclarationImportUsage};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Fe,
|
|
2
|
+
import{Fe,Xn,C,v,_a,Li,ja,Ga}from"../../chunk-9mdgtq38.js";import"../../chunk-6ekemc3h.js";import"../../chunk-t5nmnzy6.js";import"../../chunk-cgqg1br8.js";export{ja as convertToTypeOnlyImport,C as extractAllImportedItems,Fe as getImportSourceLiteral,Li as isTypeOnlyImportItem,Ga as mergeImports,_a as parseExportDetailed,v as parseImportDetailed,Xn as parseImportStatement};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{l}from"../../chunk-
|
|
2
|
+
import{l}from"../../chunk-6sdswv08.js";import"../../chunk-pnfjhm01.js";import"../../chunk-g3737b7k.js";import{fe,x,de,pe,me,ge,qn,Jn,he}from"../../chunk-g743tp4d.js";import{Xn,C}from"../../chunk-9mdgtq38.js";import{er}from"../../chunk-6ekemc3h.js";import"../../chunk-aw6spwvp.js";import{n,Ht,Be,Q,dt,o,pt,We,U}from"../../chunk-ywff3fq9.js";import{f}from"../../chunk-587w6ktw.js";import"../../chunk-hkcqbex1.js";import"../../chunk-cdq514ff.js";import"../../chunk-vk5r6pgx.js";import"../../chunk-6r01zgys.js";import"../../chunk-gwa4hmfa.js";import"../../chunk-t5nmnzy6.js";import"../../chunk-cgqg1br8.js";export{er as clearProcessorCaches,C as extractAllImportedItems,U as extractSatisfiesType,o as findMatchingBracket,f as formatComments,Be as inferArrayType,pt as inferFunctionType,n as inferNarrowType,Ht as inferNarrowTypeInUnion,dt as inferObjectType,We as isGenericType,Q as parseArrayElements,Xn as parseImportStatement,me as processClassDeclaration,l as processDeclarations,ge as processEnumDeclaration,Jn as processExportDeclaration,fe as processFunctionDeclaration,qn as processImportDeclaration,de as processInterfaceDeclaration,he as processModuleDeclaration,pe as processTypeDeclaration,x as processVariableDeclaration};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{zt,Ut,n,Ht,B,$a,W,Kt,Be,Q,ir,qt,dt,z,ye,o,pt,We,U,za,Ua,Ha,Ka,qa,Ja,Ya,Ea,Xa,Za,Qa}from"../../chunk-ywff3fq9.js";import"../../chunk-587w6ktw.js";import"../../chunk-hkcqbex1.js";import"../../chunk-cdq514ff.js";import{y,ee,K}from"../../chunk-vk5r6pgx.js";import"../../chunk-6r01zgys.js";import"../../chunk-gwa4hmfa.js";import"../../chunk-t5nmnzy6.js";import"../../chunk-cgqg1br8.js";export{qt as classFieldDefaultDoc,ye as cleanParameterDefaults,Ut as consumeCleanDefault,zt as enableCleanDefaultCollection,Ka as extractInferTypes,U as extractSatisfiesType,o as findMatchingBracket,W as indentNestedType,Be as inferArrayType,z as inferCallType,Ua as inferConditionalType,B as inferFunctionBodyReturnType,pt as inferFunctionType,Xa as inferKeyofType,za as inferMappedType,n as inferNarrowType,Ht as inferNarrowTypeInUnion,Kt as inferNewExpressionType,dt as inferObjectType,Ha as inferTemplateLiteralTypeAdvanced,Za as inferTypeofType,ee as isBigIntLiteral,qa as isComplexType,We as isGenericType,Qa as isIndexedAccessType,y as isNumericLiteral,ir as leadingSourceComments,K as numericLiteralType,Q as parseArrayElements,Ea as parseTypeParameters,Ya as parseUtilityType,$a as primitiveMethodReturnType,Ja as simplifyComplexType};
|
package/dist/src/processor.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"../chunk-cgqg1br8.js";import"../chunk-
|
|
2
|
+
import"../chunk-cgqg1br8.js";import"../chunk-t5nmnzy6.js";import"../chunk-gwa4hmfa.js";import"../chunk-aw6spwvp.js";import"../chunk-pnfjhm01.js";import{f}from"../chunk-587w6ktw.js";import"../chunk-hkcqbex1.js";import"../chunk-vk5r6pgx.js";import"../chunk-cdq514ff.js";import"../chunk-6r01zgys.js";import{n,Ht,Be,Q,dt,o,pt,We,U}from"../chunk-ywff3fq9.js";import{fe,x,de,pe,me,ge,qn,Jn,he}from"../chunk-g743tp4d.js";import{er}from"../chunk-6ekemc3h.js";import{Xn,C}from"../chunk-9mdgtq38.js";import"../chunk-g3737b7k.js";import{l}from"../chunk-6sdswv08.js";export{er as clearProcessorCaches,C as extractAllImportedItems,U as extractSatisfiesType,o as findMatchingBracket,f as formatComments,Be as inferArrayType,pt as inferFunctionType,n as inferNarrowType,Ht as inferNarrowTypeInUnion,dt as inferObjectType,We as isGenericType,Q as parseArrayElements,Xn as parseImportStatement,me as processClassDeclaration,l as processDeclarations,ge as processEnumDeclaration,Jn as processExportDeclaration,fe as processFunctionDeclaration,qn as processImportDeclaration,de as processInterfaceDeclaration,he as processModuleDeclaration,pe as processTypeDeclaration,x as processVariableDeclaration};
|
package/dist/src/profiling.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{en,$r,ds,ps,tn,ms}from"../chunk-9bj73ygx.js";export{en as Profiler,tn as Timer,ps as createProfiledIo,$r as createProfiler,ms as createTimer,ds as profileExecution};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Ii}from"../chunk-6j4wx5mf.js";import"../chunk-0gy70m6b.js";import"../chunk-h28vzayq.js";import"../chunk-g743tp4d.js";import"../chunk-6y728pph.js";import"../chunk-9mdgtq38.js";import"../chunk-6ekemc3h.js";import"../chunk-aw6spwvp.js";import"../chunk-ywff3fq9.js";import"../chunk-587w6ktw.js";import"../chunk-hkcqbex1.js";import"../chunk-cdq514ff.js";import"../chunk-vk5r6pgx.js";import"../chunk-6r01zgys.js";import"../chunk-gwa4hmfa.js";import"../chunk-mzxxgnp8.js";import"../chunk-t5nmnzy6.js";import"../chunk-cgqg1br8.js";export{Ii as createReturnTypeScope};
|
package/dist/src/security.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{_,k,Ye,
|
|
2
|
+
import{_,k,Ye,Yr,hn,Xr,Zr,Qr,vt,yn,St,ei,oo,ao,co,lo}from"../chunk-pggbb1c0.js";export{_ as DEFAULT_SECURITY_CONFIG,k as SecurityError,oo as createSecureBatchProcessor,ei as createSecureProcessor,lo as createSecurityMiddleware,hn as isBlockedPath,co as isSafePath,Zr as isSymlink,ao as sanitizeFilename,yn as validateFileBatch,vt as validateFilePath,Xr as validateFileSize,Ye as validatePath,Yr as validatePaths,Qr as validateSymlink,St as withTimeout};
|
package/dist/src/source-cache.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{_t,ue,
|
|
2
|
+
import{_t,ue,jn,Gn,Vn,zn,Un}from"../chunk-j67chb8m.js";import"../chunk-srfpcjtn.js";import"../chunk-v6fwy63g.js";export{jn as batchParseSourceFiles,Gn as clearSourceFileCache,zn as getPendingParseCount,_t as getSourceFile,ue as getSourceFileAsync,Vn as getSourceFileCacheSize,Un as shouldUseAsyncParsing};
|
package/dist/src/sourcemap.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{pn,Ct,Hs,Ks,qs,Js,Jr,Ys,Xs}from"../chunk-heqx5083.js";export{Ct as SourceMapConsumer,pn as SourceMapGenerator,qs as appendInlineSourceMap,Ks as appendSourceMapComment,Xs as buildDeclarationMappings,Hs as createSourceMap,Ys as extractSourceMap,Jr as readSourceMap,Js as writeSourceMap};
|
package/dist/src/stx.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{O,
|
|
2
|
+
import{O,Ca,I}from"../chunk-fpa2ea8k.js";import"../chunk-qbk49jz5.js";export{O as isStxFile,Ca as parseStxScripts,I as transformStxToTs};
|
package/dist/src/tracking.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Xt,Zt,Qt,ss,os}from"../chunk-7dmn623d.js";export{Xt as Tracker,ss as analyzeImports,os as analyzeTypes,Zt as createTracker,Qt as trackDeclarations};
|
package/dist/src/transformers.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{$i,Ei,Nn,Bo,ki,Wo,Te,_o,it,jo,Ti,Go,Ai,Vo,zo,Uo,Ho,Di,Pi,Ko,qo,Jo,Yo,Xo,Zo,Qo,ea}from"../chunk-j7rpp55s.js";import"../chunk-7pw9ayve.js";export{Ei as cloneDeclaration,Wo as composeTransformers,$i as createDeclaration,Vo as createJSDocTransformer,Di as createModifierTransformer,ea as createNamespacePrefixPlugin,Ho as createParameterTransformer,Ti as createPrefixTransformer,Ai as createRemoveTransformer,jo as createRenameTransformer,Uo as createReturnTypeTransformer,Jo as createStripTagsTransformer,Go as createSuffixTransformer,it as createTransformerPlugin,zo as createTypeTransformer,Yo as createWrapTypeTransformer,Qo as declarePlugin,Te as filterByKind,_o as filterByPredicate,Bo as findDeclarations,ki as mapDeclarations,qo as optionalTransformer,Xo as readonlyPlugin,Pi as readonlyTransformer,Ko as requiredTransformer,Zo as stripPrivatePlugin,Nn as walkDeclarations};
|
package/dist/src/tree-shaker.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{gt,ht,yt,
|
|
2
|
+
import{gt,ht,yt,yr,br,wr,as}from"../chunk-nmht3krt.js";export{wr as analyzeDependencies,ht as buildDeclarationDependencyGraph,as as createTreeShaker,yt as extractTypeReferences,br as findUnusedDeclarations,gt as treeShake,yr as treeShakeContent};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{wi,xi,Ci,vi,Si,Mn,ie,Lo,No,Rt,Fo}from"../chunk-0d5nemtn.js";export{Mn as TypeMapper,Fo as TypeTransformers,Rt as applyTypeMappings,ie as createTypeMapper,Lo as defaultTypeMapper,wi as defaultTypeMappings,Si as getPresetMappings,Ci as readonlyTypeMappings,vi as simplifiedTypeMappings,No as strictTypeMapper,xi as strictTypeMappings};
|
package/dist/src/utils.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{tt,
|
|
2
|
+
import{tt,Oo,Y,bi,re,Tt,At,Dt,Pt}from"../chunk-x569v6av.js";import"../chunk-hgg4aqvf.js";import"../chunk-v22xpr7j.js";import"../chunk-nnayqrp5.js";import"../chunk-rc1zpm7f.js";import"../chunk-x6ddycvm.js";import"../chunk-g9emajpc.js";import"../chunk-6b6rt0yh.js";import"../chunk-8vvryt8p.js";export{Pt as addSourceMapComment,Oo as assertNever,re as checkIsolatedDeclarationsConfig,At as createDiff,Dt as generateDeclarationMap,bi as getAllTypeScriptFiles,tt as sourceMapCommentPrefix,Tt as validateDtsContent,Y as writeToFile};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import type { Declaration } from './types.js';
|
|
2
|
+
/** Prepare emitted call queries before private closure, including in isolated mode. */
|
|
3
|
+
export declare function inferDeclarationCallTypes(declarations: Iterable<Declaration>): void;
|
|
2
4
|
/**
|
|
3
5
|
* Infer identifier aliases and monomorphic local calls before private closure.
|
|
4
6
|
* This models straight-line assignments, not TypeScript's complete control-flow graph.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Gt,Yn}from"../chunk-6y728pph.js";import"../chunk-9mdgtq38.js";import"../chunk-6ekemc3h.js";import"../chunk-aw6spwvp.js";import"../chunk-ywff3fq9.js";import"../chunk-587w6ktw.js";import"../chunk-hkcqbex1.js";import"../chunk-cdq514ff.js";import"../chunk-vk5r6pgx.js";import"../chunk-6r01zgys.js";import"../chunk-gwa4hmfa.js";import"../chunk-t5nmnzy6.js";import"../chunk-cgqg1br8.js";export{Gt as inferDeclarationCallTypes,Yn as inferDeclarationValueAliases};
|
package/dist/src/vue.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{L,
|
|
2
|
+
import{L,va,Ot,It,c,Ne,ot,Lt,Nt,at,ct,lt,Ft,ut,Bt,Wt,N}from"../chunk-qbk49jz5.js";export{Ft as collapseTypeText,Nt as extractDefaultExportOptions,ct as filterLocalValueStatements,Ne as findMacroCall,c as findMatching,at as getOptionValue,L as isVueFile,ot as mapRuntimeProps,It as maskNonCode,va as parseVueSfc,lt as removeInlinedDeclaration,Bt as resolveEmitsType,Wt as resolveExposedType,ut as resolvePropsType,Ot as skipNonCode,Lt as stripMacroStatements,N as transformVueSfcToTs};
|
package/dist/src/watcher.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Ni,ka,Fi,Ta}from"../chunk-6c8nk9rm.js";export{Ta as createWatchLogger,Ni as createWatcher,Fi as formatWatchResult,ka as watchAndGenerate};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"../chunk-srfpcjtn.js";import"../chunk-
|
|
2
|
+
import"../chunk-srfpcjtn.js";import"../chunk-cgqg1br8.js";import"../chunk-t5nmnzy6.js";import"../chunk-qbk49jz5.js";import"../chunk-fpa2ea8k.js";import"../chunk-v6fwy63g.js";import"../chunk-gwa4hmfa.js";import"../chunk-mzxxgnp8.js";import"../chunk-hkcqbex1.js";import"../chunk-aw6spwvp.js";import"../chunk-h28vzayq.js";import"../chunk-vk5r6pgx.js";import"../chunk-cdq514ff.js";import"../chunk-6r01zgys.js";import"../chunk-587w6ktw.js";import"../chunk-ywff3fq9.js";import"../chunk-0gy70m6b.js";import"../chunk-g743tp4d.js";import"../chunk-6j4wx5mf.js";import"../chunk-6ekemc3h.js";import"../chunk-9mdgtq38.js";import"../chunk-6y728pph.js";import"../chunk-3d49h0bx.js";import"../chunk-j67chb8m.js";import{r}from"../chunk-bys9tn88.js";import"../chunk-dak0dhnx.js";import"../chunk-pnfjhm01.js";import"../chunk-g3737b7k.js";import{l}from"../chunk-6sdswv08.js";import{Ze}from"../chunk-d6cwtv8p.js";import*as R from"fs";import{parentPort as M}from"worker_threads";var P=typeof Bun<"u"?Bun:null,S=P?null:R,T=Promise.resolve({extractDeclarations:r,processDeclarations:l});async function N(e){let u=Date.now();try{let{extractDeclarations:m,processDeclarations:A}=await T,f=e.config?.keepComments,C=e.config?.isolatedDeclarations,v=e.config?.importOrder,B=e.config?.engine;if(e.type==="process-batch"){let{filePaths:o,outPaths:D}=e,p=o?null:e.files||[],d=o?o.length:p.length,w=e.writeOutput===!0,g=w?null:Array(d),c=null,b=e.sources;if(!b&&d>0){let t=Array(d);for(let s=0;s<d;s++){let n=p?p[s]:null,h=n?n.sourceCode:void 0,i=o?o[s]:n.filePath;if(h!=null)t[s]=Promise.resolve(h);else if(P)t[s]=P.file(i).text();else t[s]=Promise.resolve(S.readFileSync(i,"utf-8"))}b=await Promise.all(t)}let x={filePath:"",sourceCode:"",declarations:[]},O=w&&P?Array(d):null,F=!0;for(let t=0;t<d;t++){let s=p?p[t]:null,n=o?o[t]:s.filePath,h=D?D[t]:s?s.outPath:void 0;try{let i=b?b[t]:s?.sourceCode||"",a=null,y=Ze(i,n,f??!0,v??["bun"],C??!1,B);if(y===null)a=m(i,n,f,C),x.filePath=n,x.sourceCode=i,x.declarations=a,y=A(a,x,f??!0,v);if(w){if(!h)throw Error(`Missing outPath for ${n}`);if(P)O[t]=P.write(h,y);else S.writeFileSync(h,y)}else if(g)g[t]={filePath:n,success:!0,content:y,declarations:a}}catch(i){let a=i&&i.message?i.message:String(i);if(w){if(!c)c=[];c.push({filePath:n,success:!1,error:a})}else if(g)g[t]={filePath:n,success:!1,error:a};F=!1}}if(O)await Promise.all(O);let E=c?.length?`${c[0].filePath}: ${c[0].error||"Worker batch failed"}`:void 0;return{id:e.id,success:F,filePath:e.filePath,batchResults:w?c||void 0:g,error:E,duration:Date.now()-u}}if(e.type==="extract"){let o=m(e.sourceCode,e.filePath,f,C);return{id:e.id,success:!0,filePath:e.filePath,declarations:o,duration:Date.now()-u}}if(e.type==="process"){let o=m(e.sourceCode,e.filePath,f,C),D=A(o,{filePath:e.filePath,sourceCode:e.sourceCode,declarations:o},f??!0,v);return{id:e.id,success:!0,filePath:e.filePath,content:D,declarations:o,duration:Date.now()-u}}throw Error(`Unknown task type: ${e.type}`)}catch(m){return{id:e.id,success:!1,filePath:e.filePath,error:m.message,duration:Date.now()-u}}}M?.on("message",async(e)=>{let u=await N(e);M.postMessage(u)});
|
package/dist/src/worker.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Yt,mr,_i,ji,Gi}from"../chunk-hbmnkmzb.js";import"../chunk-8vvryt8p.js";export{Yt as WorkerPool,ji as batchFiles,Gi as calculateOptimalBatchSize,mr as createWorkerPool,_i as parallelProcess};
|
package/dist/src/workspace.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{ti,ni,bn,uo,ri,ii,fo}from"../chunk-cp8xdvb6.js";import"../chunk-egmen4qn.js";import"../chunk-spdw3tc0.js";import"../chunk-msa98cgm.js";import"../chunk-d6cwtv8p.js";import"../chunk-6sdswv08.js";import"../chunk-pnfjhm01.js";import"../chunk-tgaear7n.js";import"../chunk-h6ddkhyq.js";import"../chunk-193aw7d6.js";import"../chunk-dak0dhnx.js";import"../chunk-x569v6av.js";import"../chunk-hgg4aqvf.js";import"../chunk-87mk4nnk.js";import"../chunk-0d5nemtn.js";import"../chunk-v22xpr7j.js";import"../chunk-nnayqrp5.js";import"../chunk-geqq4mmz.js";import"../chunk-7pw9ayve.js";import"../chunk-1k5r7bpf.js";import"../chunk-j4w3zxc1.js";import"../chunk-g3737b7k.js";import"../chunk-rc1zpm7f.js";import"../chunk-1t77gtcx.js";import"../chunk-x6ddycvm.js";import"../chunk-g9emajpc.js";import"../chunk-6b6rt0yh.js";import"../chunk-8vvryt8p.js";import"../chunk-bys9tn88.js";import"../chunk-3d49h0bx.js";import"../chunk-fpa2ea8k.js";import"../chunk-qbk49jz5.js";import"../chunk-j67chb8m.js";import"../chunk-srfpcjtn.js";import"../chunk-v6fwy63g.js";import"../chunk-6j4wx5mf.js";import"../chunk-0gy70m6b.js";import"../chunk-h28vzayq.js";import"../chunk-g743tp4d.js";import"../chunk-6y728pph.js";import"../chunk-9mdgtq38.js";import"../chunk-6ekemc3h.js";import"../chunk-aw6spwvp.js";import"../chunk-ywff3fq9.js";import"../chunk-587w6ktw.js";import"../chunk-hkcqbex1.js";import"../chunk-cdq514ff.js";import"../chunk-vk5r6pgx.js";import"../chunk-6r01zgys.js";import"../chunk-gwa4hmfa.js";import"../chunk-mzxxgnp8.js";import"../chunk-t5nmnzy6.js";import"../chunk-cgqg1br8.js";export{ri as discoverWorkspaceFromPackageJson,ti as discoverWorkspaceProjects,fo as generateFromPackageWorkspaces,uo as generateMonorepo,bn as generateWorkspace,ii as resolveWorkspacePatterns,ni as sortProjectsByDependencies};
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@dtsx/dtsx",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"sideEffects": false,
|
|
5
|
-
"version": "0.11.
|
|
5
|
+
"version": "0.11.54",
|
|
6
6
|
"description": "A modern, fast .d.ts generation tool, powered by Bun.",
|
|
7
7
|
"author": "Chris Breuer <chris@stacksjs.org>",
|
|
8
8
|
"license": "MIT",
|
|
@@ -100,12 +100,12 @@
|
|
|
100
100
|
"zip:darwin-arm64": "zip -j bin/dtsx-darwin-arm64.zip bin/dtsx-darwin-arm64"
|
|
101
101
|
},
|
|
102
102
|
"devDependencies": {
|
|
103
|
-
"@stacksjs/clapp": "^0.2.
|
|
103
|
+
"@stacksjs/clapp": "^0.2.17",
|
|
104
104
|
"bunfig": "^0.15.21",
|
|
105
|
-
"prettier": "^3.
|
|
105
|
+
"prettier": "^3.10.1"
|
|
106
106
|
},
|
|
107
107
|
"peerDependencies": {
|
|
108
|
-
"prettier": "^3.
|
|
108
|
+
"prettier": "^3.10.1"
|
|
109
109
|
},
|
|
110
110
|
"peerDependenciesMeta": {
|
|
111
111
|
"prettier": {
|
package/dist/chunk-a04yhmwb.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{G}from"./chunk-srfpcjtn.js";import{Le,Wn}from"./chunk-cq5zpg9c.js";import{ue,jn}from"./chunk-937czex4.js";function Ri(){jn(),Wn()}function r(e,t,c=!0,n=!1,o){return Le(e,t,c,n,o)}async function Bn(e,t,c=!0,n={}){return await ue(t,e,n),r(e,t,c)}async function Mi(e,t={}){let c=G(t.concurrency,4),n=new Map;for(let o=0;o<e.length;o+=c){let s=e.slice(o,o+c),i=await Promise.all(s.map(async(a)=>({path:a.filePath,declarations:await Bn(a.sourceCode,a.filePath,a.keepComments,t)})));for(let a of i)n.set(a.path,a.declarations)}return n}
|
|
3
|
-
export{Ri,r,Bn,Mi};
|
package/dist/chunk-nrb601nx.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
var e="@dtsx/dtsx",i="module",n="0.11.52",r=!0,c="A modern, fast .d.ts generation tool, powered by Bun.",u="Chris Breuer <chris@stacksjs.org>",a="MIT",b="https://github.com/stacksjs/dtsx#readme",o={type:"git",url:"git+https://github.com/stacksjs/dtsx.git"},p={url:"https://github.com/stacksjs/dtsx/issues"},d=["dts","generation","isolated declarations","development","bun","stacks","typescript","javascript"],m={".":{import:"./dist/index.js"},"./*":{import:"./dist/*"}},k="./dist/index.js",l="./dist/index.d.ts",x={dtsx:"./dist/cli.js"},g=["dist"],h={benchmark:"bun benchmark/index.ts","benchmark:prepare":"cd packages/zig-dtsx && zig build -Doptimize=ReleaseFast && cd ../.. && bun build benchmark/oxc-emit.ts --compile --splitting --bytecode --minify --format=esm --outfile benchmark/oxc-emit","benchmark:publish":"bun benchmark/index.ts --json benchmark/results.json --runs 3 && bun benchmark/render.ts","benchmark:tsdown":"bun benchmark/tsdown.ts",build:"bun --filter './packages/dtsx' build",test:"find packages -name '*.test.ts' -print | xargs bun test","test:public-sdk":"bun scripts/verify-public-sdk.ts","test:standalone":"bun scripts/verify-standalone.ts","typecheck:public-sdk":"bun x tsc --project tsconfig.public-sdk.json",lint:"bun x --bun pickier .","lint:fix":"bun x --bun pickier . --fix",format:"bun x --bun pickier . --format","format:fix":"bun x --bun pickier . --format --write",changelog:"bun x @stacksjs/logsmith --verbose","changelog:generate":"bun x @stacksjs/logsmith --output CHANGELOG.md",release:"bun x --bun @stacksjs/bumpx prompt --recursive","release:patch":"bun x --bun @stacksjs/bumpx patch --recursive --commit --tag --push --yes","release:minor":"bun x --bun @stacksjs/bumpx minor --recursive --commit --tag --push --yes",typecheck:"bun x tsc --noEmit","dev:docs":"bun --bun bunpress dev docs","build:docs":"bun --bun bunpress build docs","preview:docs":"bun --bun bunpress preview docs"},j={"@stacksjs/bumpx":"^0.2.32","@stacksjs/bunpress":"^0.2.31","@stacksjs/clapp":"^0.2.16",pickier:"^0.1.88","@stacksjs/gitlint":"^0.1.8","@stacksjs/logsmith":"^0.2.14","@types/bun":"^1.4.4","buddy-bot":"^0.10.5","bun-git-hooks":"^0.3.3","@dtsx/bun":"workspace:*",mitata:"^1.0.34","oxc-transform":"^0.157.0","oxc-parser":"^0.157.0",tsdown:"^0.23.7",typescript:"^7.0.2"},y=["packages/*"],f={typescript:"^7.0.2"},v={name:e,type:i,version:n,private:r,description:c,author:u,license:a,homepage:b,repository:o,bugs:p,keywords:d,exports:m,module:k,types:l,bin:x,files:g,scripts:h,devDependencies:j,workspaces:y,overrides:f,"git-hooks":{"pre-commit":{"staged-lint":{"*.{js,ts,json,yaml,yml,md}":"bun x --bun pickier lint --fix"}},"commit-msg":"bun x gitlint --edit .git/COMMIT_EDITMSG"}};export{u as author,x as bin,p as bugs,v as default,c as description,j as devDependencies,m as exports,g as files,b as homepage,d as keywords,a as license,k as module,e as name,f as overrides,r as private,o as repository,h as scripts,i as type,l as types,n as version,y as workspaces};
|
package/dist/chunk-zbrj37wa.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{a,i}from"./chunk-cgqg1br8.js";import{t,m}from"./chunk-6ekgn7sc.js";import{ft,Gt}from"./chunk-sbmdk35p.js";import{C}from"./chunk-zpvcnc7c.js";import{n,z}from"./chunk-4nrrjn7g.js";function F(g,w){let D=(B)=>t(B).map((y)=>B.slice(y.start,y.end)).join("");return D(g)===D(w)}function fe(g){if(["number","string","boolean","bigint","symbol","undefined","null"].includes(g))return g;let w=n(g,!1);return["number","string","boolean","bigint","undefined","null"].includes(w)?w:void 0}function de(g,w){if(F(g,w))return g;let D=fe(w);if(!D)return;let B=t(g),y=0,v=0,E=[];for(let S of B){let k=g.slice(S.start,S.end);if(k==="("||k==="["||k==="{"||k==="<")y++;else if(k===")"||k==="]"||k==="}"||k===">")y--;else if(k==="|"&&y===0)E.push(g.slice(v,S.start).trim()),v=S.end}E.push(g.slice(v).trim());let W=E.find((S)=>F(S,w));if(W)return W;if(E.includes(D))return D==="boolean"&&(w==="true"||w==="false")?w:D;return}function Jn(g,w,D,B=new Set){let y=new Map,v=[],E=new Set;for(let e of[...w,...D.values()]){if(E.has(e))continue;if(E.add(e),v.push(e),e.kind==="import")for(let o of C(e.text))y.set(o,{declared:`typeof ${o}`,flow:`typeof ${o}`,unresolved:!1});else if(["function","class","enum"].includes(e.kind))y.set(e.name,{declared:`typeof ${e.name}`,flow:`typeof ${e.name}`,unresolved:!1});else if(e.kind==="variable")y.set(e.name,{declared:e.typeAnnotation,unresolved:!1})}v.sort((e,o)=>(e.start??0)-(o.start??0));let W=new Set(v.filter((e)=>e.kind==="function"&&!e.generics).map((e)=>e.name));for(let e of B)W.add(e);let S=new Map,k=(e)=>{if(e=e.trimStart(),S.has(e))return S.get(e);if(S.set(e,void 0),!a(e.charCodeAt(0)))return;let o=1;while(i(e.charCodeAt(o)))o++;if(!W.has(e.slice(0,o)))return;let r=t(e);if(r[0]?.kind!=="word"||!r[1]||e.slice(r[1].start,r[1].end)!=="(")return;let d=1;for(let s=2;s<r.length;s++){let l=e.slice(r[s].start,r[s].end);if(l==="(")d++;else if(l===")"&&--d===0){let c=s===r.length-1?e.slice(r[0].start,r[0].end):void 0;return S.set(e,c),c}}return},_=new Set(v.filter((e)=>e.kind==="variable"&&!e.typeAnnotation&&typeof e.value==="string").map((e)=>k(e.value)).filter((e)=>e!==void 0)).size?m(g):void 0,L=new Map;if(_){let e=0;for(let o=0;o<_.length;o++){let r=g.slice(_[o].start,_[o].end);if(e===0&&r==="function"){let d=_[o+1],s=d&&g.slice(d.start,d.end)==="*"?_[o+2]:d;if(s?.kind==="word"){let l=g.slice(s.start,s.end);L.set(l,(L.get(l)??0)+1)}}if(["{","(","["].includes(r))e++;else if(["}",")","]"].includes(r))e--}}let I=new Map;for(let e of v)if(e.kind==="function"&&!e.generics&&L.get(e.name)===1)I.set(e.name,e);for(let e of B){let o=v.find((r)=>r.kind==="import"&&C(r.text).includes(e));if(o)I.set(e,o)}let j="__dtsx_call_result";while(g.includes(j))j+="_";let X=(e)=>`(typeof ${e}) extends (...args: never[]) => infer ${j} ? ${j} : never`,G=new Map,N=!1;for(let e of v){if(e.kind!=="variable"||e.typeAnnotation||typeof e.value!=="string")continue;let o=z(e.value);if(o&&n(e.value,!1)===o)e.inferredType=o,e.text=`${e.isExported?"export ":""}declare ${e.modifiers?.[0]??"const"} ${e.name}: ${o};`;let r=k(e.value);if(r&&I.has(r))G.set(e,X(r)),y.get(e.name).active=!0,y.get(r).active=!0,N=!0;if(e.modifiers?.[0]!=="const")continue;let d=ft(e.value);if(!d||d===e.name||!y.has(d))continue;y.get(d).active=!0,y.get(e.name).active=!0,N=!0}if(!N)return;let u=_??m(g),f=(e)=>u[e]?g.slice(u[e].start,u[e].end):"",b=new Map,O=new Map,J=new Set,P=new Set,Q=new Set,Y=new Map,x=[];for(let e=0;e<u.length;e++){let o=f(e),r=x.at(-1);if(r!==void 0)O.set(e,r);if(o==="{"&&["=","(","[",",",":","?","return","yield"].includes(f(e-1)))J.add(e);if(["(","[","{"].includes(o))x.push(e);else if([")","]","}"].includes(o)){let d=x.at(-1);if(d!==void 0&&["()","[]","{}"].includes(f(d)+o))x.pop(),b.set(d,e)}}let Z=new Map;for(let e=0;e<u.length;){if(u[e].kind!=="punctuation"){e++;continue}let r=[">>>=","**=","&&=","||=","??=","<<=",">>=","===","!==",">>>","**","&&","||","??","<<",">>","=>","==","!=","<=",">=","++","--","+=","-=","*=","/=","%=","&=","|=","^=","="].find((s)=>g.startsWith(s,u[e].start))??f(e);Z.set(e,r);let d=u[e].start+r.length;do e++;while(e<u.length&&u[e].start<d)}for(let e=0;e<u.length;e++){let o=te(e);if(o!==void 0)P.add(o)}for(let e of P)ce(e);let h=0;function ee(e){let o=ft(e);if(o){let l=y.get(o);return{type:l?.flow,unresolved:l?.unresolved??!1}}let r=k(e),d=r?I.get(r):void 0;if(d)return{type:d.returnType&&fe(d.returnType)?d.returnType:X(r),unresolved:!1};let s=n(e,!0);return{type:s==="unknown"?void 0:s,unresolved:!1}}function T(e){return Z.get(e)??""}function U(e){if(u[e]?.kind!=="word"||Q.has(e)||f(e-1)==="."||f(e-1)==="#"&&f(e-2)===".")return;let o=y.get(f(e));if(!o?.active)return;let r=T(e+1);if(["=","+=","-=","*=","/=","%=","**=","<<=",">>=",">>>=","&=","|=","^=","&&=","||=","??="].includes(r))return{binding:o,operator:r};if(["++","--"].includes(r)&&!/[\r\n]/.test(g.slice(u[e].end,u[e+1].start)))return{binding:o,operator:r};if(e>=2&&["++","--"].includes(T(e-2))){let d=u[e-3],s=d&&(d.kind==="word"||d.kind==="quoted"||[")","]"].includes(f(e-3)));if(!d||!s||/[\r\n;]/.test(g.slice(d.end,u[e-2].start)))return{binding:o,operator:T(e-2)}}return}function ne(e){let o=U(e);return o?.operator==="="?o.binding:void 0}function te(e){if(u[e]?.kind!=="word"||f(e)!=="class"||f(e-1)==="."||["(",":","="].includes(f(e+1)))return;let o=e+1,r=0;while(o<u.length){let d=f(o);if(d==="{"&&r===0)return o;if(d==="class"){let s=te(o);if(s!==void 0){o=(b.get(s)??s)+1;continue}}if(d==="function"){let s=oe(o,u.length);if(s){o=s.end;continue}}if(d==="<")r++;else if(d===">"&&T(o-1)!=="=>"&&r>0)r--;if(d===";")break;o=(b.get(o)??o)+1}return}function ie(e,o,r){let d=e,s=!1,l=r?["public","protected","private","static","abstract","override","declare","readonly","accessor","async","get","set"]:["async","get","set"];while(l.includes(f(d))&&!["(","<","?","!",":","=",";","}"].includes(f(d+1))){if(f(d)==="static")s=!0;d++}if(f(d)==="*")d++;if(r&&f(d)==="#")d++;if(f(d)==="["){let p=b.get(d);return p===void 0?void 0:{next:p+1,isStatic:s}}if(u[d]?.kind==="word"||u[d]?.kind==="quoted")return{next:d+1,isStatic:s};let c=d+1;while(c<o&&u[c-1].end===u[c].start&&!["(","<","?","!",":","=",";","}","[","{",","].includes(f(c)))c++;if(d<o&&n(g.slice(u[d].start,u[c-1].end),!1)==="number")return{next:c,isStatic:s};return}function V(e,o,r){let d=ie(e,o,r);if(!d)return;let s=d.next;if(r&&["?","!"].includes(f(s)))s++;if(f(s)==="<"){let l=1;s++;while(s<o&&l>0){if(f(s)==="<")l++;else if(f(s)===">"&&T(s-1)!=="=>")l--;s=(b.get(s)??s)+1}if(l!==0)return}return s}function re(e,o,r){return V(e,o,r)===o}function ae(e,o){let r=0,d=-1;for(let s=e;s<o;s=(b.get(s)??s)+1)if(f(s)==="<"&&(r>0||s>e&&(u[s-1].kind==="word"||[")","]"].includes(f(s-1))))){if(r===0)d=s;r++}else if(f(s)===">"&&T(s-1)!=="=>"&&r>0){if(r--,s===o-1&&r===0)return d<s-1}return!1}function le(e,o){if(f(e)==="static"&&f(e+1)==="{")return!0;let r=V(e,o,!0);return r!==void 0&&(r===o||["(",":","=",";","}"].includes(f(r)))}function q(e,o,r=!1){let d=b.get(o)??u.length,s=e;while(s<d){if(f(s)===";"||r&&T(s)==="=")return s;if(s>e&&O.get(s)===o&&/[\r\n]/.test(g.slice(u[s-1].end,u[s].start))){let l=f(s-1),p=!(l===">"&&ae(e,s)&&le(s,d))&&["+","-","*","/","%","=","<",">","&","|","^","!","~","?",":",",",".","(","[","{","as","in","of","new","typeof","keyof","extends","instanceof","satisfies","await","yield","void"].includes(l),M=[".","?",":",")","]","}",",","+","-","*","/","%","<",">","=","&","|","^","`","(","[","as","satisfies","instanceof","in"].includes(f(s));if(!p&&!M)return s}s=(b.get(s)??s)+1}return d}function K(e,o){for(let r=e;r<o;r++){if(f(r)==="["&&b.has(r)){r=b.get(r);continue}if(u[r].kind==="word")Q.add(r)}}function ce(e){let o=b.get(e)??u.length,r=e+1;while(r<o){if(f(r)===";"){r++;continue}if(f(r)==="static"&&f(r+1)==="{"){r=(b.get(r+1)??r+1)+1;continue}let d=ie(r,o,!0);if(!d){r++;continue}let s=V(r,o,!0);if(s===void 0){r++;continue}if(K(r,s),f(s)==="("){let c=b.get(s),p=c===void 0?void 0:se(c,o);if(p!==void 0){r=(b.get(p)??p)+1;continue}}let l=s;if(f(l)===":")l=q(l+1,e,!0);if(T(l)==="="){K(r,l+1);let c=l+1,p=q(c,e);if(!d.isStatic&&p>c)Y.set(c,p);r=p}else{let c=q(s,e);K(r,c),r=Math.max(r+1,c)}}}function ue(e){let o=O.get(e);if(o===void 0)return!1;let r=P.has(o);if(!r&&!J.has(o))return!1;if(re(o+1,e,r))return!0;for(let d=o+1;d<e;d++){let s=O.get(d),l=O.get(d)===o&&(f(d)===","||r&&f(d)===";"),c=r&&f(d)==="}"&&s!==void 0&&O.get(s)===o,p=r&&O.get(d+1)===o&&/[\r\n]/.test(g.slice(u[d].end,u[d+1].start));if((l||c||p)&&re(d+1,e,r))return!0}return!1}function se(e,o){let r=e+1,d=f(r)===":"?r+1:void 0;while(r<o){if(f(r)==="{"&&(d===void 0||!Gt(g.slice(u[d].start,u[r].start))))return r;if(d===void 0)return;r=(b.get(r)??r)+1}return}function oe(e,o){let r=-1;if(f(e)==="("){let s=b.get(e);if(s!==void 0&&ue(e))r=se(s,o)??-1;else if(s!==void 0&&T(s+1)==="=>")r=s+3;else if(s!==void 0&&f(s+1)===":"){let l=s+2;while(l<o&&f(l)!==";"){if(T(l)==="=>"){r=l+2;break}l=(b.get(l)??l)+1}}}else if(u[e]?.kind==="word"&&T(e+1)==="=>")r=e+3;else if(f(e)==="function"){let s=e+1;while(s<o&&f(s)!=="(")s=(b.get(s)??s)+1;let l=b.get(s);if(l===void 0)return;r=l+1;let c=f(r)===":"?r+1:void 0;while(r<o){if(f(r)==="{"&&(c===void 0||!Gt(g.slice(u[c].start,u[r].start))))break;r=(b.get(r)??r)+1}}if(r<0||r>=o)return;if(f(r)==="{")return{start:e,end:(b.get(r)??o-1)+1};let d=r;while(d<o&&![",",";",")","]","}"].includes(f(d)))d=(b.get(d)??d)+1;return{start:e,end:d}}function H(e,o,r=!0){for(let d=e;d<o;d++){let s=Y.get(d);if(s!==void 0){d=Math.min(s,o)-1;continue}let l=r?oe(d,o):void 0;if(l){let p=l.end;while(f(p)===")")p++;if(f(p)==="("||f(p)==="."&&["call","apply"].includes(f(p+1))&&f(p+2)==="(")H(l.start,l.end,!1);d=l.end-1;continue}let c=U(d);if(c)c.binding.flow=void 0,c.binding.unresolved=!0}}function ge(e){let o=!1;while(h<u.length&&u[h].start<e){let r=f(h);if(["if","else","for","while","do","switch","try","catch","finally","with"].includes(r))o=!0;if(r===";")o=!1;if(r==="("||r==="{"||r==="["){let c=b.get(h)??h+1;while(c<u.length&&u[c].start>=e)c--;if(H(h+1,c),h=c+1,r==="{")o=!1;continue}let d=ne(h);if(d){let l=h+2,c=l,p=[];while(c<u.length&&u[c].start<e){let A=f(c);if(p.length===0&&(A===";"||c>l&&/[\r\n]/.test(g.slice(u[c-1].end,u[c].start))&&(ne(c)||["if","for","while","switch","try","do","return","throw"].includes(A))))break;if(A==="("||A==="{"||A==="[")p.push(A==="("?")":A==="{"?"}":"]");else if(A===p.at(-1))p.pop();c++}let M=c>l?g.slice(u[l].start,u[c-1].end):"";H(l,c);let R=ee(M);d.flow=!o&&R.type?d.declared?de(d.declared,R.type):R.type:void 0,d.unresolved=o||R.unresolved||!d.flow,h=c;continue}let s=U(h);if(s)s.binding.flow=void 0,s.binding.unresolved=!0;h++}}for(let e of v){ge(e.start??0);let o=h;while(h<u.length&&u[h].start<(e.end??0))h++;if(e.kind!=="variable")continue;if(e.initializerStart!==void 0){let M=o;while(M<h&&u[M].start<e.initializerStart)M++;H(M,h)}let r=y.get(e.name);if(!r.active)continue;let d=typeof e.value==="string"?e.value:"";if(!d){r.flow=r.declared;continue}let s=ee(d),l=ft(d),c=l?y.get(l):void 0,p=G.get(e);if(p)e.inferredType=p;else if(!e.typeAnnotation&&e.modifiers?.[0]==="const"&&l&&l!==e.name&&c){if(s.unresolved)e.inferenceError="DTSX_UNSUPPORTED_VALUE_FLOW";else if(s.type)e.inferredType=c.declared&&F(c.declared,s.type)?`typeof ${l}`:s.type}if(e.inferredType)e.text=`${e.isExported?"export ":""}declare ${e.modifiers?.[0]??"const"} ${e.name}: ${e.inferredType};`;if(e.typeAnnotation)r.flow=s.type?de(e.typeAnnotation,s.type)??e.typeAnnotation:e.typeAnnotation;else if(e.inferredType)r.declared=e.inferredType,r.flow=e.inferredType;else{let M=e.modifiers?.[0]==="const",R=d.trim().startsWith("{")||d.trim().startsWith("["),A=n(d,M&&!R);r.declared=A==="unknown"?void 0:A,r.flow=r.declared}r.unresolved=s.unresolved}}
|
|
3
|
-
export{Jn};
|