@kubb/ast 5.23.2 → 5.23.4

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.
Files changed (167) hide show
  1. package/dist/{constants-Ckeonm-D.js → constants-BTTus9ee.js} +1 -1
  2. package/dist/{constants-Ckeonm-D.js.map → constants-BTTus9ee.js.map} +1 -1
  3. package/dist/{constants-CquR083U.cjs → constants-DztHlVmY.cjs} +1 -1
  4. package/dist/{constants-CquR083U.cjs.map → constants-DztHlVmY.cjs.map} +1 -1
  5. package/dist/factory.cjs +3 -3
  6. package/dist/factory.d.cts +4 -4
  7. package/dist/factory.d.ts +4 -4
  8. package/dist/factory.js +3 -3
  9. package/dist/{file-xJnBQPGq.d.ts → file-B269mZh4.d.cts} +96 -40
  10. package/dist/file-Bq2GPaxh.js +427 -0
  11. package/dist/file-Bq2GPaxh.js.map +1 -0
  12. package/dist/file-C4pqV8yl.cjs +469 -0
  13. package/dist/file-C4pqV8yl.cjs.map +1 -0
  14. package/dist/{file-CvlMAp_d.js → file-D_ih0x7q.js} +32 -19
  15. package/dist/file-D_ih0x7q.js.map +1 -0
  16. package/dist/{file-Dd50jPkH.cjs → file-DiPZBLSP.cjs} +32 -19
  17. package/dist/file-DiPZBLSP.cjs.map +1 -0
  18. package/dist/{file-BVqSiSvV.d.cts → file-oLlejzZV.d.ts} +96 -40
  19. package/dist/file.cjs +5 -2
  20. package/dist/file.d.cts +2 -2
  21. package/dist/file.d.ts +2 -2
  22. package/dist/file.js +3 -1
  23. package/dist/{graph-BcwFCvei.js → graph-BUEOBomo.js} +5 -5
  24. package/dist/{graph-BcwFCvei.js.map → graph-BUEOBomo.js.map} +1 -1
  25. package/dist/{graph-DcIY6tQb.cjs → graph-CFJ4wzFR.cjs} +5 -5
  26. package/dist/{graph-DcIY6tQb.cjs.map → graph-CFJ4wzFR.cjs.map} +1 -1
  27. package/dist/graph.cjs +1 -1
  28. package/dist/graph.d.cts +1 -1
  29. package/dist/graph.d.ts +1 -1
  30. package/dist/graph.js +1 -1
  31. package/dist/{guards-COVJE6TU.cjs → guards-4drgx10i.cjs} +1 -1
  32. package/dist/{guards-COVJE6TU.cjs.map → guards-4drgx10i.cjs.map} +1 -1
  33. package/dist/{guards-DlJkKsT1.js → guards-DKw4uwc5.js} +1 -1
  34. package/dist/{guards-DlJkKsT1.js.map → guards-DKw4uwc5.js.map} +1 -1
  35. package/dist/{guards-D-h9R_sV.d.ts → guards-RCnH6re9.d.ts} +1 -1
  36. package/dist/{guards-B8qDgSaT.d.cts → guards-u-dAAtl8.d.cts} +1 -1
  37. package/dist/{http-DwboM6pK.js → http-CAWf6TAJ.js} +2 -2
  38. package/dist/http-CAWf6TAJ.js.map +1 -0
  39. package/dist/{http-Bm5lhVK4.cjs → http-Dv8py6wh.cjs} +2 -2
  40. package/dist/http-Dv8py6wh.cjs.map +1 -0
  41. package/dist/http.cjs +2 -2
  42. package/dist/http.d.cts +2 -2
  43. package/dist/http.d.ts +2 -2
  44. package/dist/http.js +2 -2
  45. package/dist/{index-eGkM4FE9.d.ts → index-2TMYDLjK.d.ts} +1 -1
  46. package/dist/index-6-ZZCX9W.d.ts +24 -0
  47. package/dist/index-B2nnOQjf.d.cts +24 -0
  48. package/dist/{index-Csf8xsCc.d.cts → index-BgFaJtnv.d.ts} +11 -5
  49. package/dist/index-Bj7a0aSM.d.cts +5 -0
  50. package/dist/{index-DKJdlX1l.d.cts → index-Bw2oMIM1.d.cts} +4 -4
  51. package/dist/{index-Bb1kqq8H.d.cts → index-C1za72gL.d.cts} +1 -1
  52. package/dist/index-CW-ztJjd.d.ts +5 -0
  53. package/dist/{index-CoRdlrVx.d.ts → index-DF7CbpYW.d.ts} +3 -3
  54. package/dist/{index-CwLhqYbA.d.cts → index-D_WLsIMP.d.cts} +2 -2
  55. package/dist/{index-Dp50LM3a.d.ts → index-DbAnYRRM.d.ts} +1 -1
  56. package/dist/{index-cpjUxIik.d.ts → index-DbQ-J072.d.cts} +11 -5
  57. package/dist/{index-CFH4ZC7q.d.ts → index-DfRcRYF2.d.ts} +1 -1
  58. package/dist/{index-DU_jYpBt.d.cts → index-DpnCCtXt.d.cts} +1 -1
  59. package/dist/{index-BSf-ETQP.d.ts → index-DzHcy3vy.d.ts} +2 -2
  60. package/dist/{index-W6yFx0sy.d.ts → index-UwSVys3m.d.ts} +4 -4
  61. package/dist/{index-BVuX3-Th.d.cts → index-c9FD2S5f.d.cts} +3 -3
  62. package/dist/{index-DYDha-3I.d.cts → index-sdprVPKQ.d.cts} +1 -1
  63. package/dist/index.cjs +16 -16
  64. package/dist/index.d.cts +17 -17
  65. package/dist/index.d.ts +17 -17
  66. package/dist/index.js +16 -16
  67. package/dist/{json-DURdtz9A.cjs → json-CCWMgzJZ.cjs} +2 -2
  68. package/dist/{json-DURdtz9A.cjs.map → json-CCWMgzJZ.cjs.map} +1 -1
  69. package/dist/{json-DH7_lcWm.js → json-DyDtIZTj.js} +2 -2
  70. package/dist/{json-DH7_lcWm.js.map → json-DyDtIZTj.js.map} +1 -1
  71. package/dist/json.cjs +1 -1
  72. package/dist/json.d.cts +1 -1
  73. package/dist/json.d.ts +1 -1
  74. package/dist/json.js +1 -1
  75. package/dist/{macro-4N8vHE-2.js → macro-9WouvtZe.js} +2 -2
  76. package/dist/{macro-4N8vHE-2.js.map → macro-9WouvtZe.js.map} +1 -1
  77. package/dist/{macro-V_cNODx2.cjs → macro-BEwfGNu1.cjs} +2 -2
  78. package/dist/{macro-V_cNODx2.cjs.map → macro-BEwfGNu1.cjs.map} +1 -1
  79. package/dist/macro.cjs +1 -1
  80. package/dist/macro.d.cts +1 -1
  81. package/dist/macro.d.ts +1 -1
  82. package/dist/macro.js +1 -1
  83. package/dist/{mediaType-D8uIO8sG.cjs → mediaType-BbIfudh0.cjs} +1 -1
  84. package/dist/{mediaType-D8uIO8sG.cjs.map → mediaType-BbIfudh0.cjs.map} +1 -1
  85. package/dist/{mediaType-CRjggmoG.js → mediaType-DXQCNYdM.js} +1 -1
  86. package/dist/{mediaType-CRjggmoG.js.map → mediaType-DXQCNYdM.js.map} +1 -1
  87. package/dist/mediaType.cjs +1 -1
  88. package/dist/mediaType.d.cts +1 -1
  89. package/dist/mediaType.d.ts +1 -1
  90. package/dist/mediaType.js +1 -1
  91. package/dist/{node-Djh-mZB2.js → node-DtuO3zr8.js} +4 -4
  92. package/dist/{node-Djh-mZB2.js.map → node-DtuO3zr8.js.map} +1 -1
  93. package/dist/{node-DjcETnc8.cjs → node-vTrAIz3e.cjs} +4 -4
  94. package/dist/{node-DjcETnc8.cjs.map → node-vTrAIz3e.cjs.map} +1 -1
  95. package/dist/node.cjs +4 -4
  96. package/dist/node.d.cts +3 -3
  97. package/dist/node.d.ts +3 -3
  98. package/dist/node.js +4 -4
  99. package/dist/{nodeText-DVVDZQjF.js → nodeText-BSYvDZOH.js} +2 -2
  100. package/dist/{nodeText-DVVDZQjF.js.map → nodeText-BSYvDZOH.js.map} +1 -1
  101. package/dist/{nodeText-DRb_rVd1.cjs → nodeText-CZ7wgxu9.cjs} +2 -2
  102. package/dist/{nodeText-DRb_rVd1.cjs.map → nodeText-CZ7wgxu9.cjs.map} +1 -1
  103. package/dist/{nodes-CWMa9xhW.js → nodes-ClL1C158.js} +5 -5
  104. package/dist/nodes-ClL1C158.js.map +1 -0
  105. package/dist/{nodes-BB60Bq2H.cjs → nodes-DEQjVliP.cjs} +5 -5
  106. package/dist/nodes-DEQjVliP.cjs.map +1 -0
  107. package/dist/{operation-X7chCdL2.d.cts → operation-AFw8tzIN.d.cts} +22 -6
  108. package/dist/{operation-BgRyVS7z.d.ts → operation-Cu4XSaJQ.d.ts} +22 -6
  109. package/dist/{optionality-D-zqzVMH.cjs → optionality-C-qULYxo.cjs} +1 -1
  110. package/dist/{optionality-D-zqzVMH.cjs.map → optionality-C-qULYxo.cjs.map} +1 -1
  111. package/dist/{optionality-DISn8ytP.js → optionality-FkRredTC.js} +1 -1
  112. package/dist/{optionality-DISn8ytP.js.map → optionality-FkRredTC.js.map} +1 -1
  113. package/dist/{promise-RpnEev9D.js → promise-B3YkZ4C8.js} +1 -1
  114. package/dist/{promise-RpnEev9D.js.map → promise-B3YkZ4C8.js.map} +1 -1
  115. package/dist/{promise-BOdlgT0N.cjs → promise-DScaykew.cjs} +1 -1
  116. package/dist/{promise-BOdlgT0N.cjs.map → promise-DScaykew.cjs.map} +1 -1
  117. package/dist/{ref-P0ZLT1Bg.cjs → ref-Bh5Xo8T7.cjs} +4 -4
  118. package/dist/{ref-P0ZLT1Bg.cjs.map → ref-Bh5Xo8T7.cjs.map} +1 -1
  119. package/dist/{ref-Bu7PoHar.js → ref-DPqeS8K1.js} +4 -4
  120. package/dist/{ref-Bu7PoHar.js.map → ref-DPqeS8K1.js.map} +1 -1
  121. package/dist/ref.cjs +2 -2
  122. package/dist/ref.d.cts +1 -1
  123. package/dist/ref.d.ts +1 -1
  124. package/dist/ref.js +2 -2
  125. package/dist/{refs-YCV3CznS.js → refs-Bgf8_9Ui.js} +2 -2
  126. package/dist/{refs-YCV3CznS.js.map → refs-Bgf8_9Ui.js.map} +1 -1
  127. package/dist/{refs-CYHpRlQo.cjs → refs-rmr2LFV1.cjs} +2 -2
  128. package/dist/{refs-CYHpRlQo.cjs.map → refs-rmr2LFV1.cjs.map} +1 -1
  129. package/dist/{schema-DloctnMm.js → schema-4UcdIPQ2.js} +7 -7
  130. package/dist/{schema-DloctnMm.js.map → schema-4UcdIPQ2.js.map} +1 -1
  131. package/dist/{schema-BIErWqgc.cjs → schema-DuCY4lCG.cjs} +7 -7
  132. package/dist/{schema-BIErWqgc.cjs.map → schema-DuCY4lCG.cjs.map} +1 -1
  133. package/dist/{schema-hxMlgCrV.cjs → schema-gSjYgaCl.cjs} +2 -2
  134. package/dist/schema-gSjYgaCl.cjs.map +1 -0
  135. package/dist/{schema-2ZAQk7qE.js → schema-tH14gE6i.js} +2 -2
  136. package/dist/schema-tH14gE6i.js.map +1 -0
  137. package/dist/schema.cjs +5 -5
  138. package/dist/schema.d.cts +4 -4
  139. package/dist/schema.d.ts +4 -4
  140. package/dist/schema.js +5 -5
  141. package/dist/{visitor-DTrzvA3R.cjs → visitor-Bh1CBAOz.cjs} +4 -5
  142. package/dist/{visitor-DTrzvA3R.cjs.map → visitor-Bh1CBAOz.cjs.map} +1 -1
  143. package/dist/{visitor-1TSWTMe1.d.ts → visitor-CpmsR8o5.d.ts} +2 -2
  144. package/dist/{visitor-CUbaaX8R.d.cts → visitor-DnBK2MNl.d.cts} +2 -2
  145. package/dist/{visitor-NoQSUQTu.js → visitor-XA0W3OVv.js} +4 -5
  146. package/dist/{visitor-NoQSUQTu.js.map → visitor-XA0W3OVv.js.map} +1 -1
  147. package/package.json +1 -1
  148. package/dist/file-Cg0T6cgz.cjs +0 -319
  149. package/dist/file-Cg0T6cgz.cjs.map +0 -1
  150. package/dist/file-CnuL8oUj.js +0 -283
  151. package/dist/file-CnuL8oUj.js.map +0 -1
  152. package/dist/file-CvlMAp_d.js.map +0 -1
  153. package/dist/file-Dd50jPkH.cjs.map +0 -1
  154. package/dist/http-Bm5lhVK4.cjs.map +0 -1
  155. package/dist/http-DwboM6pK.js.map +0 -1
  156. package/dist/index-BWd95onW.d.cts +0 -5
  157. package/dist/index-BwnMIoLl.d.ts +0 -24
  158. package/dist/index-DSVef1pp.d.cts +0 -24
  159. package/dist/index-DaHsMJ_S.d.ts +0 -5
  160. package/dist/nodes-BB60Bq2H.cjs.map +0 -1
  161. package/dist/nodes-CWMa9xhW.js.map +0 -1
  162. package/dist/schema-2ZAQk7qE.js.map +0 -1
  163. package/dist/schema-hxMlgCrV.cjs.map +0 -1
  164. /package/dist/{base-IpYuh3ZP.d.cts → base-LhsPvVY1.d.ts} +0 -0
  165. /package/dist/{base-IpYuh3ZP.d.ts → base-UFBZi-FO.d.cts} +0 -0
  166. /package/dist/{index-Cc2K3OzU.d.cts → index-C-nsgwuD.d.ts} +0 -0
  167. /package/dist/{index-Cc2K3OzU.d.ts → index-DR9ahJ-x.d.cts} +0 -0
@@ -138,4 +138,4 @@ const schemaTypes = {
138
138
  };
139
139
  export { schemaTypes as n, nodeKinds as t };
140
140
 
141
- //# sourceMappingURL=constants-Ckeonm-D.js.map
141
+ //# sourceMappingURL=constants-BTTus9ee.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants-Ckeonm-D.js","names":[],"sources":["../src/constants.ts"],"sourcesContent":["import type { SchemaType } from './nodes/schema.ts'\n\n/**\n * Node kind discriminators used by every AST node (for example `node.kind === nodeKinds.text`).\n */\nexport const nodeKinds = {\n input: 'Input',\n operation: 'Operation',\n schema: 'Schema',\n property: 'Property',\n parameter: 'Parameter',\n response: 'Response',\n requestBody: 'RequestBody',\n content: 'Content',\n type: 'Type',\n file: 'File',\n import: 'Import',\n export: 'Export',\n source: 'Source',\n const: 'Const',\n function: 'Function',\n arrowFunction: 'ArrowFunction',\n text: 'Text',\n break: 'Break',\n jsx: 'Jsx',\n} as const\n\n/**\n * Schema type discriminators used by all AST schema nodes.\n *\n * Each value is a stable discriminator across the AST (for example `schema.type === schemaTypes.object`).\n */\nexport const schemaTypes = {\n /**\n * Text value.\n */\n string: 'string',\n /**\n * Floating-point number (`float`, `double`).\n */\n number: 'number',\n /**\n * Whole number (`int32`). Use `bigint` for `int64`.\n */\n integer: 'integer',\n /**\n * 64-bit integer (`int64`). Only used when `integerType` is set to `'bigint'`.\n */\n bigint: 'bigint',\n /**\n * Boolean value.\n */\n boolean: 'boolean',\n /**\n * Explicit null value.\n */\n null: 'null',\n /**\n * Any value (no type restriction).\n */\n any: 'any',\n /**\n * Unknown value (must be narrowed before usage).\n */\n unknown: 'unknown',\n /**\n * No return value (`void`).\n */\n void: 'void',\n /**\n * Object with named properties.\n */\n object: 'object',\n /**\n * Sequential list of items.\n */\n array: 'array',\n /**\n * Fixed-length list with position-specific items.\n */\n tuple: 'tuple',\n /**\n * \"One of\" multiple schema members.\n */\n union: 'union',\n /**\n * \"All of\" multiple schema members.\n */\n intersection: 'intersection',\n /** \"Not\" a single schema member. */\n not: 'not',\n /**\n * Enum schema.\n */\n enum: 'enum',\n /**\n * Reference to another schema.\n */\n ref: 'ref',\n /**\n * Calendar date (for example `2026-03-24`).\n */\n date: 'date',\n /**\n * Date-time value (for example `2026-03-24T09:00:00Z`).\n */\n datetime: 'datetime',\n /**\n * Time-only value (for example `09:00:00`).\n */\n time: 'time',\n /**\n * UUID value.\n */\n uuid: 'uuid',\n /**\n * Email address value.\n */\n email: 'email',\n /**\n * URL value.\n */\n url: 'url',\n /**\n * IPv4 address value.\n */\n ipv4: 'ipv4',\n /**\n * IPv6 address value.\n */\n ipv6: 'ipv6',\n /**\n * Binary/blob value.\n */\n blob: 'blob',\n /**\n * Impossible value (`never`).\n */\n never: 'never',\n} as const satisfies Record<SchemaType, SchemaType>\n"],"mappings":";;;;AAKA,MAAa,YAAY;CACvB,OAAO;CACP,WAAW;CACX,QAAQ;CACR,UAAU;CACV,WAAW;CACX,UAAU;CACV,aAAa;CACb,SAAS;CACT,MAAM;CACN,MAAM;CACN,QAAQ;CACR,QAAQ;CACR,QAAQ;CACR,OAAO;CACP,UAAU;CACV,eAAe;CACf,MAAM;CACN,OAAO;CACP,KAAK;AACP;;;;;;AAOA,MAAa,cAAc;;;;CAIzB,QAAQ;;;;CAIR,QAAQ;;;;CAIR,SAAS;;;;CAIT,QAAQ;;;;CAIR,SAAS;;;;CAIT,MAAM;;;;CAIN,KAAK;;;;CAIL,SAAS;;;;CAIT,MAAM;;;;CAIN,QAAQ;;;;CAIR,OAAO;;;;CAIP,OAAO;;;;CAIP,OAAO;;;;CAIP,cAAc;;CAEd,KAAK;;;;CAIL,MAAM;;;;CAIN,KAAK;;;;CAIL,MAAM;;;;CAIN,UAAU;;;;CAIV,MAAM;;;;CAIN,MAAM;;;;CAIN,OAAO;;;;CAIP,KAAK;;;;CAIL,MAAM;;;;CAIN,MAAM;;;;CAIN,MAAM;;;;CAIN,OAAO;AACT"}
1
+ {"version":3,"file":"constants-BTTus9ee.js","names":[],"sources":["../src/constants.ts"],"sourcesContent":["import type { SchemaType } from './nodes/schema.ts'\n\n/**\n * Node kind discriminators used by every AST node (for example `node.kind === nodeKinds.text`).\n */\nexport const nodeKinds = {\n input: 'Input',\n operation: 'Operation',\n schema: 'Schema',\n property: 'Property',\n parameter: 'Parameter',\n response: 'Response',\n requestBody: 'RequestBody',\n content: 'Content',\n type: 'Type',\n file: 'File',\n import: 'Import',\n export: 'Export',\n source: 'Source',\n const: 'Const',\n function: 'Function',\n arrowFunction: 'ArrowFunction',\n text: 'Text',\n break: 'Break',\n jsx: 'Jsx',\n} as const\n\n/**\n * Schema type discriminators used by all AST schema nodes.\n *\n * Each value is a stable discriminator across the AST (for example `schema.type === schemaTypes.object`).\n */\nexport const schemaTypes = {\n /**\n * Text value.\n */\n string: 'string',\n /**\n * Floating-point number (`float`, `double`).\n */\n number: 'number',\n /**\n * Whole number (`int32`). Use `bigint` for `int64`.\n */\n integer: 'integer',\n /**\n * 64-bit integer (`int64`). Only used when `integerType` is set to `'bigint'`.\n */\n bigint: 'bigint',\n /**\n * Boolean value.\n */\n boolean: 'boolean',\n /**\n * Explicit null value.\n */\n null: 'null',\n /**\n * Any value (no type restriction).\n */\n any: 'any',\n /**\n * Unknown value (must be narrowed before usage).\n */\n unknown: 'unknown',\n /**\n * No return value (`void`).\n */\n void: 'void',\n /**\n * Object with named properties.\n */\n object: 'object',\n /**\n * Sequential list of items.\n */\n array: 'array',\n /**\n * Fixed-length list with position-specific items.\n */\n tuple: 'tuple',\n /**\n * \"One of\" multiple schema members.\n */\n union: 'union',\n /**\n * \"All of\" multiple schema members.\n */\n intersection: 'intersection',\n /** \"Not\" a single schema member. */\n not: 'not',\n /**\n * Enum schema.\n */\n enum: 'enum',\n /**\n * Reference to another schema.\n */\n ref: 'ref',\n /**\n * Calendar date (for example `2026-03-24`).\n */\n date: 'date',\n /**\n * Date-time value (for example `2026-03-24T09:00:00Z`).\n */\n datetime: 'datetime',\n /**\n * Time-only value (for example `09:00:00`).\n */\n time: 'time',\n /**\n * UUID value.\n */\n uuid: 'uuid',\n /**\n * Email address value.\n */\n email: 'email',\n /**\n * URL value.\n */\n url: 'url',\n /**\n * IPv4 address value.\n */\n ipv4: 'ipv4',\n /**\n * IPv6 address value.\n */\n ipv6: 'ipv6',\n /**\n * Binary/blob value.\n */\n blob: 'blob',\n /**\n * Impossible value (`never`).\n */\n never: 'never',\n} as const satisfies Record<SchemaType, SchemaType>\n"],"mappings":";;;;AAKA,MAAa,YAAY;CACvB,OAAO;CACP,WAAW;CACX,QAAQ;CACR,UAAU;CACV,WAAW;CACX,UAAU;CACV,aAAa;CACb,SAAS;CACT,MAAM;CACN,MAAM;CACN,QAAQ;CACR,QAAQ;CACR,QAAQ;CACR,OAAO;CACP,UAAU;CACV,eAAe;CACf,MAAM;CACN,OAAO;CACP,KAAK;AACP;;;;;;AAOA,MAAa,cAAc;;;;CAIzB,QAAQ;;;;CAIR,QAAQ;;;;CAIR,SAAS;;;;CAIT,QAAQ;;;;CAIR,SAAS;;;;CAIT,MAAM;;;;CAIN,KAAK;;;;CAIL,SAAS;;;;CAIT,MAAM;;;;CAIN,QAAQ;;;;CAIR,OAAO;;;;CAIP,OAAO;;;;CAIP,OAAO;;;;CAIP,cAAc;;CAEd,KAAK;;;;CAIL,MAAM;;;;CAIN,KAAK;;;;CAIL,MAAM;;;;CAIN,UAAU;;;;CAIV,MAAM;;;;CAIN,MAAM;;;;CAIN,OAAO;;;;CAIP,KAAK;;;;CAIL,MAAM;;;;CAIN,MAAM;;;;CAIN,MAAM;;;;CAIN,OAAO;AACT"}
@@ -149,4 +149,4 @@ Object.defineProperty(exports, "schemaTypes", {
149
149
  }
150
150
  });
151
151
 
152
- //# sourceMappingURL=constants-CquR083U.cjs.map
152
+ //# sourceMappingURL=constants-DztHlVmY.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants-CquR083U.cjs","names":[],"sources":["../src/constants.ts"],"sourcesContent":["import type { SchemaType } from './nodes/schema.ts'\n\n/**\n * Node kind discriminators used by every AST node (for example `node.kind === nodeKinds.text`).\n */\nexport const nodeKinds = {\n input: 'Input',\n operation: 'Operation',\n schema: 'Schema',\n property: 'Property',\n parameter: 'Parameter',\n response: 'Response',\n requestBody: 'RequestBody',\n content: 'Content',\n type: 'Type',\n file: 'File',\n import: 'Import',\n export: 'Export',\n source: 'Source',\n const: 'Const',\n function: 'Function',\n arrowFunction: 'ArrowFunction',\n text: 'Text',\n break: 'Break',\n jsx: 'Jsx',\n} as const\n\n/**\n * Schema type discriminators used by all AST schema nodes.\n *\n * Each value is a stable discriminator across the AST (for example `schema.type === schemaTypes.object`).\n */\nexport const schemaTypes = {\n /**\n * Text value.\n */\n string: 'string',\n /**\n * Floating-point number (`float`, `double`).\n */\n number: 'number',\n /**\n * Whole number (`int32`). Use `bigint` for `int64`.\n */\n integer: 'integer',\n /**\n * 64-bit integer (`int64`). Only used when `integerType` is set to `'bigint'`.\n */\n bigint: 'bigint',\n /**\n * Boolean value.\n */\n boolean: 'boolean',\n /**\n * Explicit null value.\n */\n null: 'null',\n /**\n * Any value (no type restriction).\n */\n any: 'any',\n /**\n * Unknown value (must be narrowed before usage).\n */\n unknown: 'unknown',\n /**\n * No return value (`void`).\n */\n void: 'void',\n /**\n * Object with named properties.\n */\n object: 'object',\n /**\n * Sequential list of items.\n */\n array: 'array',\n /**\n * Fixed-length list with position-specific items.\n */\n tuple: 'tuple',\n /**\n * \"One of\" multiple schema members.\n */\n union: 'union',\n /**\n * \"All of\" multiple schema members.\n */\n intersection: 'intersection',\n /** \"Not\" a single schema member. */\n not: 'not',\n /**\n * Enum schema.\n */\n enum: 'enum',\n /**\n * Reference to another schema.\n */\n ref: 'ref',\n /**\n * Calendar date (for example `2026-03-24`).\n */\n date: 'date',\n /**\n * Date-time value (for example `2026-03-24T09:00:00Z`).\n */\n datetime: 'datetime',\n /**\n * Time-only value (for example `09:00:00`).\n */\n time: 'time',\n /**\n * UUID value.\n */\n uuid: 'uuid',\n /**\n * Email address value.\n */\n email: 'email',\n /**\n * URL value.\n */\n url: 'url',\n /**\n * IPv4 address value.\n */\n ipv4: 'ipv4',\n /**\n * IPv6 address value.\n */\n ipv6: 'ipv6',\n /**\n * Binary/blob value.\n */\n blob: 'blob',\n /**\n * Impossible value (`never`).\n */\n never: 'never',\n} as const satisfies Record<SchemaType, SchemaType>\n"],"mappings":";;;;AAKA,MAAa,YAAY;CACvB,OAAO;CACP,WAAW;CACX,QAAQ;CACR,UAAU;CACV,WAAW;CACX,UAAU;CACV,aAAa;CACb,SAAS;CACT,MAAM;CACN,MAAM;CACN,QAAQ;CACR,QAAQ;CACR,QAAQ;CACR,OAAO;CACP,UAAU;CACV,eAAe;CACf,MAAM;CACN,OAAO;CACP,KAAK;AACP;;;;;;AAOA,MAAa,cAAc;;;;CAIzB,QAAQ;;;;CAIR,QAAQ;;;;CAIR,SAAS;;;;CAIT,QAAQ;;;;CAIR,SAAS;;;;CAIT,MAAM;;;;CAIN,KAAK;;;;CAIL,SAAS;;;;CAIT,MAAM;;;;CAIN,QAAQ;;;;CAIR,OAAO;;;;CAIP,OAAO;;;;CAIP,OAAO;;;;CAIP,cAAc;;CAEd,KAAK;;;;CAIL,MAAM;;;;CAIN,KAAK;;;;CAIL,MAAM;;;;CAIN,UAAU;;;;CAIV,MAAM;;;;CAIN,MAAM;;;;CAIN,OAAO;;;;CAIP,KAAK;;;;CAIL,MAAM;;;;CAIN,MAAM;;;;CAIN,MAAM;;;;CAIN,OAAO;AACT"}
1
+ {"version":3,"file":"constants-DztHlVmY.cjs","names":[],"sources":["../src/constants.ts"],"sourcesContent":["import type { SchemaType } from './nodes/schema.ts'\n\n/**\n * Node kind discriminators used by every AST node (for example `node.kind === nodeKinds.text`).\n */\nexport const nodeKinds = {\n input: 'Input',\n operation: 'Operation',\n schema: 'Schema',\n property: 'Property',\n parameter: 'Parameter',\n response: 'Response',\n requestBody: 'RequestBody',\n content: 'Content',\n type: 'Type',\n file: 'File',\n import: 'Import',\n export: 'Export',\n source: 'Source',\n const: 'Const',\n function: 'Function',\n arrowFunction: 'ArrowFunction',\n text: 'Text',\n break: 'Break',\n jsx: 'Jsx',\n} as const\n\n/**\n * Schema type discriminators used by all AST schema nodes.\n *\n * Each value is a stable discriminator across the AST (for example `schema.type === schemaTypes.object`).\n */\nexport const schemaTypes = {\n /**\n * Text value.\n */\n string: 'string',\n /**\n * Floating-point number (`float`, `double`).\n */\n number: 'number',\n /**\n * Whole number (`int32`). Use `bigint` for `int64`.\n */\n integer: 'integer',\n /**\n * 64-bit integer (`int64`). Only used when `integerType` is set to `'bigint'`.\n */\n bigint: 'bigint',\n /**\n * Boolean value.\n */\n boolean: 'boolean',\n /**\n * Explicit null value.\n */\n null: 'null',\n /**\n * Any value (no type restriction).\n */\n any: 'any',\n /**\n * Unknown value (must be narrowed before usage).\n */\n unknown: 'unknown',\n /**\n * No return value (`void`).\n */\n void: 'void',\n /**\n * Object with named properties.\n */\n object: 'object',\n /**\n * Sequential list of items.\n */\n array: 'array',\n /**\n * Fixed-length list with position-specific items.\n */\n tuple: 'tuple',\n /**\n * \"One of\" multiple schema members.\n */\n union: 'union',\n /**\n * \"All of\" multiple schema members.\n */\n intersection: 'intersection',\n /** \"Not\" a single schema member. */\n not: 'not',\n /**\n * Enum schema.\n */\n enum: 'enum',\n /**\n * Reference to another schema.\n */\n ref: 'ref',\n /**\n * Calendar date (for example `2026-03-24`).\n */\n date: 'date',\n /**\n * Date-time value (for example `2026-03-24T09:00:00Z`).\n */\n datetime: 'datetime',\n /**\n * Time-only value (for example `09:00:00`).\n */\n time: 'time',\n /**\n * UUID value.\n */\n uuid: 'uuid',\n /**\n * Email address value.\n */\n email: 'email',\n /**\n * URL value.\n */\n url: 'url',\n /**\n * IPv4 address value.\n */\n ipv4: 'ipv4',\n /**\n * IPv6 address value.\n */\n ipv6: 'ipv6',\n /**\n * Binary/blob value.\n */\n blob: 'blob',\n /**\n * Impossible value (`never`).\n */\n never: 'never',\n} as const satisfies Record<SchemaType, SchemaType>\n"],"mappings":";;;;AAKA,MAAa,YAAY;CACvB,OAAO;CACP,WAAW;CACX,QAAQ;CACR,UAAU;CACV,WAAW;CACX,UAAU;CACV,aAAa;CACb,SAAS;CACT,MAAM;CACN,MAAM;CACN,QAAQ;CACR,QAAQ;CACR,QAAQ;CACR,OAAO;CACP,UAAU;CACV,eAAe;CACf,MAAM;CACN,OAAO;CACP,KAAK;AACP;;;;;;AAOA,MAAa,cAAc;;;;CAIzB,QAAQ;;;;CAIR,QAAQ;;;;CAIR,SAAS;;;;CAIT,QAAQ;;;;CAIR,SAAS;;;;CAIT,MAAM;;;;CAIN,KAAK;;;;CAIL,SAAS;;;;CAIT,MAAM;;;;CAIN,QAAQ;;;;CAIR,OAAO;;;;CAIP,OAAO;;;;CAIP,OAAO;;;;CAIP,cAAc;;CAEd,KAAK;;;;CAIL,MAAM;;;;CAIN,KAAK;;;;CAIL,MAAM;;;;CAIN,UAAU;;;;CAIV,MAAM;;;;CAIN,MAAM;;;;CAIN,OAAO;;;;CAIP,KAAK;;;;CAIL,MAAM;;;;CAIN,MAAM;;;;CAIN,MAAM;;;;CAIN,OAAO;AACT"}
package/dist/factory.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_schema = require("./schema-hxMlgCrV.cjs");
3
- const require_file = require("./file-Cg0T6cgz.cjs");
4
- const require_nodes = require("./nodes-BB60Bq2H.cjs");
2
+ const require_schema = require("./schema-gSjYgaCl.cjs");
3
+ const require_file = require("./file-C4pqV8yl.cjs");
4
+ const require_nodes = require("./nodes-DEQjVliP.cjs");
5
5
  exports.createArrowFunction = require_nodes.createArrowFunction;
6
6
  exports.createBreak = require_nodes.createBreak;
7
7
  exports.createConst = require_nodes.createConst;
@@ -1,4 +1,4 @@
1
- import { C as createJsx, S as createFunction, T as createType, a as UserFileNode, b as createBreak, c as createImport, l as createSource, o as createExport, s as createFile, w as createText, x as createConst, y as createArrowFunction } from "./file-BVqSiSvV.cjs";
2
- import { Y as createSchema, Z as createProperty, a as createOperation, d as createRequestBody, h as createParameter, k as createInput, l as createResponse, y as createContent } from "./operation-X7chCdL2.cjs";
3
- import { t as Node } from "./index-DSVef1pp.cjs";
4
- export { Node, type UserFileNode, createArrowFunction, createBreak, createConst, createContent, createExport, createFile, createFunction, createImport, createInput, createJsx, createOperation, createParameter, createProperty, createRequestBody, createResponse, createSchema, createSource, createText, createType };
1
+ import { C as createArrowFunction, D as createJsx, E as createFunction, O as createText, T as createConst, c as Space, d as createFile, f as createImport, i as ImportInput, k as createType, l as UserFileNode, o as ModuleName, p as createSource, t as ExportInput, u as createExport, w as createBreak } from "./file-B269mZh4.cjs";
2
+ import { Q as createProperty, X as createSchema, a as createOperation, d as createRequestBody, h as createParameter, k as createInput, l as createResponse, y as createContent } from "./operation-AFw8tzIN.cjs";
3
+ import { t as Node } from "./index-B2nnOQjf.cjs";
4
+ export { type ExportInput, type ImportInput, type ModuleName, Node, type Space, type UserFileNode, createArrowFunction, createBreak, createConst, createContent, createExport, createFile, createFunction, createImport, createInput, createJsx, createOperation, createParameter, createProperty, createRequestBody, createResponse, createSchema, createSource, createText, createType };
package/dist/factory.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { C as createJsx, S as createFunction, T as createType, a as UserFileNode, b as createBreak, c as createImport, l as createSource, o as createExport, s as createFile, w as createText, x as createConst, y as createArrowFunction } from "./file-xJnBQPGq.js";
2
- import { Y as createSchema, Z as createProperty, a as createOperation, d as createRequestBody, h as createParameter, k as createInput, l as createResponse, y as createContent } from "./operation-BgRyVS7z.js";
3
- import { t as Node } from "./index-BwnMIoLl.js";
4
- export { Node, type UserFileNode, createArrowFunction, createBreak, createConst, createContent, createExport, createFile, createFunction, createImport, createInput, createJsx, createOperation, createParameter, createProperty, createRequestBody, createResponse, createSchema, createSource, createText, createType };
1
+ import { C as createArrowFunction, D as createJsx, E as createFunction, O as createText, T as createConst, c as Space, d as createFile, f as createImport, i as ImportInput, k as createType, l as UserFileNode, o as ModuleName, p as createSource, t as ExportInput, u as createExport, w as createBreak } from "./file-oLlejzZV.js";
2
+ import { Q as createProperty, X as createSchema, a as createOperation, d as createRequestBody, h as createParameter, k as createInput, l as createResponse, y as createContent } from "./operation-Cu4XSaJQ.js";
3
+ import { t as Node } from "./index-6-ZZCX9W.js";
4
+ export { type ExportInput, type ImportInput, type ModuleName, Node, type Space, type UserFileNode, createArrowFunction, createBreak, createConst, createContent, createExport, createFile, createFunction, createImport, createInput, createJsx, createOperation, createParameter, createProperty, createRequestBody, createResponse, createSchema, createSource, createText, createType };
package/dist/factory.js CHANGED
@@ -1,4 +1,4 @@
1
- import { t as createSchema } from "./schema-2ZAQk7qE.js";
2
- import { i as createSource, n as createFile, r as createImport, t as createExport } from "./file-CnuL8oUj.js";
3
- import { a as createOperation, c as createContent, d as createConst, f as createFunction, h as createType, i as createParameter, l as createArrowFunction, m as createText, n as createResponse, o as createRequestBody, p as createJsx, r as createProperty, s as createInput, u as createBreak } from "./nodes-CWMa9xhW.js";
1
+ import { t as createSchema } from "./schema-tH14gE6i.js";
2
+ import { i as createSource, n as createFile, r as createImport, t as createExport } from "./file-Bq2GPaxh.js";
3
+ import { a as createOperation, c as createContent, d as createConst, f as createFunction, h as createType, i as createParameter, l as createArrowFunction, m as createText, n as createResponse, o as createRequestBody, p as createJsx, r as createProperty, s as createInput, u as createBreak } from "./nodes-ClL1C158.js";
4
4
  export { createArrowFunction, createBreak, createConst, createContent, createExport, createFile, createFunction, createImport, createInput, createJsx, createOperation, createParameter, createProperty, createRequestBody, createResponse, createSchema, createSource, createText, createType };
@@ -1,4 +1,4 @@
1
- import { t as BaseNode } from "./base-IpYuh3ZP.js";
1
+ import { t as BaseNode } from "./base-UFBZi-FO.cjs";
2
2
  /**
3
3
  * JSDoc documentation metadata attached to code declarations.
4
4
  */
@@ -78,6 +78,14 @@ type TypeNode = BaseNode & {
78
78
  * Whether the declaration should be exported.
79
79
  */
80
80
  export?: boolean | null;
81
+ /**
82
+ * How the declaration is written.
83
+ * - `'type'` declares `type Name = …`
84
+ * - `'interface'` declares `interface Name { … }`, so the body must be an object type
85
+ *
86
+ * @default 'type'
87
+ */
88
+ syntax?: 'type' | 'interface' | null;
81
89
  /**
82
90
  * JSDoc documentation metadata.
83
91
  */
@@ -307,39 +315,61 @@ type ImportName = string | Array<string | {
307
315
  propertyName: string;
308
316
  name?: string;
309
317
  }>;
318
+ /**
319
+ * Whether a declaration exists only at compile time (`'type'`) or also at runtime (`'value'`).
320
+ */
321
+ type Space = 'type' | 'value';
322
+ /**
323
+ * One name an import or export brings across, as in the ECMAScript `ImportEntry` record.
324
+ */
325
+ type ModuleName = {
326
+ /**
327
+ * Name in the other module: `'default'` for its default export, `'*'` for the whole module.
328
+ */
329
+ name: string;
330
+ /**
331
+ * Local name for an import, or the exported name for an export.
332
+ */
333
+ alias?: string | null;
334
+ /**
335
+ * Type or value.
336
+ * @default 'value'
337
+ */
338
+ space?: Space | null;
339
+ };
310
340
  /**
311
341
  * Represents a language-agnostic import/dependency declaration.
312
342
  *
313
343
  * @example Named import (TypeScript: `import { useState } from 'react'`)
314
344
  * ```ts
315
- * createImport({ name: ['useState'], path: 'react' })
345
+ * createImport({ names: [{ name: 'useState' }], path: 'react' })
316
346
  * ```
317
347
  *
318
348
  * @example Default import (TypeScript: `import React from 'react'`)
319
349
  * ```ts
320
- * createImport({ name: 'React', path: 'react' })
350
+ * createImport({ names: [{ name: 'default', alias: 'React' }], path: 'react' })
321
351
  * ```
322
352
  *
323
353
  * @example Type-only import (TypeScript: `import type { FC } from 'react'`)
324
354
  * ```ts
325
- * createImport({ name: ['FC'], path: 'react', isTypeOnly: true })
355
+ * createImport({ names: [{ name: 'FC', space: 'type' }], path: 'react' })
326
356
  * ```
327
357
  *
328
358
  * @example Namespace import (TypeScript: `import * as React from 'react'`)
329
359
  * ```ts
330
- * createImport({ name: 'React', path: 'react', isNameSpace: true })
360
+ * createImport({ names: [{ name: '*', alias: 'React' }], path: 'react' })
331
361
  * ```
332
362
  */
333
363
  type ImportNode = BaseNode & {
334
364
  kind: 'Import';
365
+ /**
366
+ * The names the import brings in. `ast.file.getNames` also reads the deprecated fields.
367
+ */
368
+ names?: Array<ModuleName> | null;
335
369
  /**
336
370
  * Import name(s) to be used.
337
371
  *
338
- * @example Named imports
339
- * `['useState']`
340
- *
341
- * @example Default import
342
- * `'React'`
372
+ * @deprecated Use `names`. Removed in Kubb v6.
343
373
  */
344
374
  name: ImportName;
345
375
  /**
@@ -351,14 +381,14 @@ type ImportNode = BaseNode & {
351
381
  path: string;
352
382
  /**
353
383
  * Add a type-only import prefix.
354
- * - `true` generates `import type { Type } from './path'`
355
- * - `false` generates `import { Type } from './path'`
384
+ *
385
+ * @deprecated Set `space: 'type'` on each name. Removed in Kubb v6.
356
386
  */
357
387
  isTypeOnly?: boolean | null;
358
388
  /**
359
389
  * Import the entire module as a namespace.
360
- * - `true` generates `import * as Name from './path'`
361
- * - `false` generates a standard import
390
+ *
391
+ * @deprecated Use `{ name: '*', alias }` in `names`. Removed in Kubb v6.
362
392
  */
363
393
  isNameSpace?: boolean | null;
364
394
  /**
@@ -371,34 +401,34 @@ type ImportNode = BaseNode & {
371
401
  *
372
402
  * @example Named export (TypeScript: `export { Pets } from './Pets'`)
373
403
  * ```ts
374
- * createExport({ name: ['Pets'], path: './Pets' })
404
+ * createExport({ names: [{ name: 'Pets' }], path: './Pets' })
375
405
  * ```
376
406
  *
377
407
  * @example Type-only export (TypeScript: `export type { Pet } from './Pet'`)
378
408
  * ```ts
379
- * createExport({ name: ['Pet'], path: './Pet', isTypeOnly: true })
409
+ * createExport({ names: [{ name: 'Pet', space: 'type' }], path: './Pet' })
380
410
  * ```
381
411
  *
382
412
  * @example Wildcard export (TypeScript: `export * from './utils'`)
383
413
  * ```ts
384
- * createExport({ path: './utils' })
414
+ * createExport({ names: [{ name: '*' }], path: './utils' })
385
415
  * ```
386
416
  *
387
417
  * @example Namespace alias (TypeScript: `export * as utils from './utils'`)
388
418
  * ```ts
389
- * createExport({ name: 'utils', path: './utils', asAlias: true })
419
+ * createExport({ names: [{ name: '*', alias: 'utils' }], path: './utils' })
390
420
  * ```
391
421
  */
392
422
  type ExportNode = BaseNode & {
393
423
  kind: 'Export';
424
+ /**
425
+ * The names the export passes on. `ast.file.getNames` also reads the deprecated fields.
426
+ */
427
+ names?: Array<ModuleName> | null;
394
428
  /**
395
429
  * Export name(s) to be used. When omitted, generates a wildcard export.
396
430
  *
397
- * @example Named exports
398
- * `['useState']`
399
- *
400
- * @example Single export
401
- * `'React'`
431
+ * @deprecated Use `names`. Removed in Kubb v6.
402
432
  */
403
433
  name?: string | Array<string> | null;
404
434
  /**
@@ -410,14 +440,14 @@ type ExportNode = BaseNode & {
410
440
  path: string;
411
441
  /**
412
442
  * Add a type-only export prefix.
413
- * - `true` generates `export type { Type } from './path'`
414
- * - `false` generates `export { Type } from './path'`
443
+ *
444
+ * @deprecated Set `space: 'type'` on each name. Removed in Kubb v6.
415
445
  */
416
446
  isTypeOnly?: boolean | null;
417
447
  /**
418
448
  * Export as an aliased namespace.
419
- * - `true` generates `export * as aliasName from './path'`
420
- * - `false` generates a standard export
449
+ *
450
+ * @deprecated Use `{ name: '*', alias }` in `names`. Removed in Kubb v6.
421
451
  */
422
452
  asAlias?: boolean | null;
423
453
  };
@@ -426,7 +456,7 @@ type ExportNode = BaseNode & {
426
456
  *
427
457
  * @example Named exportable source
428
458
  * ```ts
429
- * createSource({ name: 'Pet', nodes: [createText('export type Pet = { id: number }')], isExportable: true, isIndexable: true })
459
+ * createSource({ name: 'Pet', nodes: [createText('export type Pet = { id: number }')], export: true })
430
460
  * ```
431
461
  *
432
462
  * @example Inline unnamed code block
@@ -440,21 +470,37 @@ type SourceNode = BaseNode & {
440
470
  * Optional name identifying this source (used for deduplication and barrel generation).
441
471
  */
442
472
  name?: string | null;
473
+ /**
474
+ * Type or value. When unset, a source whose first node is a `Type` is a type.
475
+ */
476
+ space?: Space | null;
443
477
  /**
444
478
  * Mark this source as a type-only export.
479
+ *
480
+ * @deprecated Use `space: 'type'`. Removed in Kubb v6.
445
481
  */
446
482
  isTypeOnly?: boolean | null;
447
483
  /**
448
- * Mark this source as an exported declaration. The source text carries its own `export` keyword.
484
+ * Mark this source as an exported declaration, which barrels list. The source text carries its own `export` keyword.
485
+ */
486
+ export?: boolean | null;
487
+ /**
488
+ * Mark this exported source as the module's default export. Barrels skip it, since they can't re-export it by name.
489
+ */
490
+ default?: boolean | null;
491
+ /**
492
+ * @deprecated Use `export`. Removed in Kubb v6.
449
493
  */
450
494
  isExportable?: boolean | null;
451
495
  /**
452
- * Include this source in barrel/index file generation.
496
+ * @deprecated Use `export`. Removed in Kubb v6.
453
497
  */
454
498
  isIndexable?: boolean | null;
455
499
  /**
456
500
  * Marks the source as a definition that importing files absorb instead of import. `expression` is
457
501
  * the declaration's right-hand side, such as `{ body: Pet }`.
502
+ *
503
+ * @deprecated Set `inline` on the file. Removed in Kubb v6.
458
504
  */
459
505
  inline?: {
460
506
  expression: string;
@@ -476,7 +522,7 @@ type SourceNode = BaseNode & {
476
522
  * const file = createFile({
477
523
  * baseName: 'petStore.ts',
478
524
  * path: 'src/models/petStore.ts',
479
- * sources: [createSource({ name: 'Pet', nodes: [createText('export type Pet = { id: number }')], isExportable: true })],
525
+ * sources: [createSource({ name: 'Pet', nodes: [createText('export type Pet = { id: number }')], export: true })],
480
526
  * imports: [createImport({ name: ['z'], path: 'zod' })],
481
527
  * exports: [createExport({ name: ['Pet'], path: './petStore' })],
482
528
  * })
@@ -543,37 +589,47 @@ type FileNode<TMeta extends object = object> = BaseNode & {
543
589
  *
544
590
  * Use to emit a real source file shipped inside a package (a template) into the generated
545
591
  * folder. When set, `copy` provides the file content and any `sources` nodes are ignored for
546
- * output; `sources` may still carry `name`/`isExportable`/`isIndexable` so barrel generation
592
+ * output; `sources` may still carry `name`/`export` so barrel generation
547
593
  * treats the file the same as a rendered one.
548
594
  */
549
595
  copy?: string | null;
596
+ /**
597
+ * Marks a file that is never written. Each file that imports from it gets the body of each imported declaration, such as `{ body: Pet }`, in place of its name.
598
+ */
599
+ inline?: boolean | null;
600
+ };
601
+ type ImportInput = Omit<ImportNode, 'kind' | 'name'> & {
602
+ name?: ImportName;
550
603
  };
604
+ type ExportInput = Omit<ExportNode, 'kind'>;
551
605
  /**
552
- * Creates an `ImportNode` representing a language-agnostic import/dependency declaration.
606
+ * Creates an `ImportNode`. A node built from `names` also gets the deprecated fields. A deprecated `name` or
607
+ * `isTypeOnly` that differs from the one `names` gives overrides it, so `{ ...imp, isTypeOnly: true }` still works.
553
608
  *
554
609
  * @example Named import
555
610
  * ```ts
556
- * createImport({ name: ['useState'], path: 'react' })
611
+ * createImport({ names: [{ name: 'useState' }], path: 'react' })
557
612
  * // import { useState } from 'react'
558
613
  * ```
559
614
  */
560
- declare const createImport: (input: Omit<ImportNode, "kind">) => ImportNode;
615
+ declare function createImport(input: ImportInput): ImportNode;
561
616
  /**
562
- * Creates an `ExportNode` representing a language-agnostic export/public API declaration.
617
+ * Creates an `ExportNode`. A node built from `names` also gets the deprecated fields. A deprecated `name` or
618
+ * `isTypeOnly` that differs from the one `names` gives overrides it.
563
619
  *
564
620
  * @example Named export
565
621
  * ```ts
566
- * createExport({ name: ['Pet'], path: './Pet' })
622
+ * createExport({ names: [{ name: 'Pet' }], path: './Pet' })
567
623
  * // export { Pet } from './Pet'
568
624
  * ```
569
625
  */
570
- declare const createExport: (input: Omit<ExportNode, "kind">) => ExportNode;
626
+ declare function createExport(input: ExportInput): ExportNode;
571
627
  /**
572
628
  * Creates a `SourceNode` representing a fragment of source code within a file.
573
629
  *
574
630
  * @example
575
631
  * ```ts
576
- * createSource({ name: 'Pet', nodes: [createText('export type Pet = { id: number }')], isExportable: true })
632
+ * createSource({ name: 'Pet', nodes: [createText('export type Pet = { id: number }')], export: true })
577
633
  * ```
578
634
  */
579
635
  declare const createSource: (input: Omit<SourceNode, "kind">) => SourceNode;
@@ -621,4 +677,4 @@ type UserFileNode<TMeta extends object = object> = Omit<FileNode<TMeta>, 'kind'
621
677
  * ```
622
678
  */
623
679
  declare function createFile<TMeta extends object = object>(input: UserFileNode<TMeta>): FileNode<TMeta>;
624
- export { createJsx as C, createFunction as S, createType as T, TextNode as _, UserFileNode as a, createBreak as b, createImport as c, BreakNode as d, CodeNode as f, JsxNode as g, JSDocNode as h, SourceNode as i, createSource as l, FunctionNode as m, FileNode as n, createExport as o, ConstNode as p, ImportNode as r, createFile as s, ExportNode as t, ArrowFunctionNode as u, TypeNode as v, createText as w, createConst as x, createArrowFunction as y };
680
+ export { createArrowFunction as C, createJsx as D, createFunction as E, createText as O, TypeNode as S, createConst as T, ConstNode as _, ImportNode as a, JsxNode as b, Space as c, createFile as d, createImport as f, CodeNode as g, BreakNode as h, ImportInput as i, createType as k, UserFileNode as l, ArrowFunctionNode as m, ExportNode as n, ModuleName as o, createSource as p, FileNode as r, SourceNode as s, ExportInput as t, createExport as u, FunctionNode as v, createBreak as w, TextNode as x, JSDocNode as y };