@azure-tools/typespec-ts 0.56.0-dev.9 → 0.56.1-dev.0

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 (377) hide show
  1. package/CHANGELOG.md +43 -0
  2. package/README.md +31 -15
  3. package/dist/src/context-manager.d.ts +23 -6
  4. package/dist/src/context-manager.d.ts.map +1 -1
  5. package/dist/src/context-manager.js +22 -0
  6. package/dist/src/context-manager.js.map +1 -1
  7. package/dist/src/framework/declaration.d.ts +1 -1
  8. package/dist/src/framework/declaration.d.ts.map +1 -1
  9. package/dist/src/framework/declaration.js +2 -1
  10. package/dist/src/framework/declaration.js.map +1 -1
  11. package/dist/src/framework/hooks/binder.d.ts +2 -5
  12. package/dist/src/framework/hooks/binder.d.ts.map +1 -1
  13. package/dist/src/framework/hooks/binder.js +2 -29
  14. package/dist/src/framework/hooks/binder.js.map +1 -1
  15. package/dist/src/framework/hooks/sdk-types.d.ts +12 -3
  16. package/dist/src/framework/hooks/sdk-types.d.ts.map +1 -1
  17. package/dist/src/framework/hooks/sdk-types.js +13 -0
  18. package/dist/src/framework/hooks/sdk-types.js.map +1 -1
  19. package/dist/src/framework/hooks/use-dependencies.d.ts +1 -1
  20. package/dist/src/framework/hooks/use-dependencies.d.ts.map +1 -1
  21. package/dist/src/framework/load-static-helpers.d.ts +2 -2
  22. package/dist/src/framework/load-static-helpers.d.ts.map +1 -1
  23. package/dist/src/framework/load-static-helpers.js +1 -13
  24. package/dist/src/framework/load-static-helpers.js.map +1 -1
  25. package/dist/src/framework/reference.js.map +1 -1
  26. package/dist/src/framework/source-file-batch.d.ts +1 -1
  27. package/dist/src/framework/source-file-batch.d.ts.map +1 -1
  28. package/dist/src/framework/source-file-batch.js +1 -1
  29. package/dist/src/framework/source-file-batch.js.map +1 -1
  30. package/dist/src/index.d.ts +4 -4
  31. package/dist/src/index.d.ts.map +1 -1
  32. package/dist/src/index.js +24 -19
  33. package/dist/src/index.js.map +1 -1
  34. package/dist/src/interfaces.d.ts +0 -1
  35. package/dist/src/interfaces.d.ts.map +1 -1
  36. package/dist/src/lib.d.ts +18 -4
  37. package/dist/src/lib.d.ts.map +1 -1
  38. package/dist/src/lib.js +22 -6
  39. package/dist/src/lib.js.map +1 -1
  40. package/dist/src/meta-tree.d.ts +2 -2
  41. package/dist/src/meta-tree.d.ts.map +1 -1
  42. package/dist/src/metadata/build-api-extractor-config.d.ts +1 -1
  43. package/dist/src/metadata/build-api-extractor-config.d.ts.map +1 -1
  44. package/dist/src/metadata/build-changelog-file.d.ts +1 -1
  45. package/dist/src/metadata/build-changelog-file.d.ts.map +1 -1
  46. package/dist/src/metadata/build-es-lint-config.d.ts +1 -1
  47. package/dist/src/metadata/build-es-lint-config.d.ts.map +1 -1
  48. package/dist/src/metadata/build-package-file.d.ts +3 -5
  49. package/dist/src/metadata/build-package-file.d.ts.map +1 -1
  50. package/dist/src/metadata/build-package-file.js +10 -45
  51. package/dist/src/metadata/build-package-file.js.map +1 -1
  52. package/dist/src/metadata/build-readme-file.d.ts +1 -1
  53. package/dist/src/metadata/build-readme-file.d.ts.map +1 -1
  54. package/dist/src/metadata/build-readme-file.js +3 -3
  55. package/dist/src/metadata/build-readme-file.js.map +1 -1
  56. package/dist/src/metadata/build-sample-env-file.d.ts +1 -1
  57. package/dist/src/metadata/build-sample-env-file.d.ts.map +1 -1
  58. package/dist/src/metadata/build-test-config.d.ts +1 -1
  59. package/dist/src/metadata/build-test-config.d.ts.map +1 -1
  60. package/dist/src/metadata/build-ts-config.d.ts +11 -5
  61. package/dist/src/metadata/build-ts-config.d.ts.map +1 -1
  62. package/dist/src/metadata/build-ts-config.js +36 -8
  63. package/dist/src/metadata/build-ts-config.js.map +1 -1
  64. package/dist/src/metadata/build-vitest-config.d.ts +1 -1
  65. package/dist/src/metadata/build-vitest-config.d.ts.map +1 -1
  66. package/dist/src/metadata/build-warp-config.d.ts +1 -3
  67. package/dist/src/metadata/build-warp-config.d.ts.map +1 -1
  68. package/dist/src/metadata/build-warp-config.js +0 -2
  69. package/dist/src/metadata/build-warp-config.js.map +1 -1
  70. package/dist/src/metadata/package-json/azure-package-common.d.ts +1 -1
  71. package/dist/src/metadata/package-json/azure-package-common.d.ts.map +1 -1
  72. package/dist/src/metadata/package-json/build-azure-monorepo-package.d.ts +1 -2
  73. package/dist/src/metadata/package-json/build-azure-monorepo-package.d.ts.map +1 -1
  74. package/dist/src/metadata/package-json/build-azure-monorepo-package.js +2 -16
  75. package/dist/src/metadata/package-json/build-azure-monorepo-package.js.map +1 -1
  76. package/dist/src/metadata/package-json/package-common.d.ts.map +1 -1
  77. package/dist/src/metadata/package-json/package-common.js +0 -15
  78. package/dist/src/metadata/package-json/package-common.js.map +1 -1
  79. package/dist/src/metadata/test/build-recorded-client.d.ts +1 -1
  80. package/dist/src/metadata/test/build-recorded-client.d.ts.map +1 -1
  81. package/dist/src/metadata/test/build-sample-test.d.ts +1 -1
  82. package/dist/src/metadata/test/build-sample-test.d.ts.map +1 -1
  83. package/dist/src/metadata/test/build-snippets.d.ts +1 -1
  84. package/dist/src/metadata/test/build-snippets.d.ts.map +1 -1
  85. package/dist/src/metadata/utils.d.ts +1 -1
  86. package/dist/src/metadata/utils.d.ts.map +1 -1
  87. package/dist/src/modular/build-classical-client.d.ts +3 -3
  88. package/dist/src/modular/build-classical-client.d.ts.map +1 -1
  89. package/dist/src/modular/build-classical-client.js +3 -3
  90. package/dist/src/modular/build-classical-client.js.map +1 -1
  91. package/dist/src/modular/build-classical-operation-groups.d.ts +3 -3
  92. package/dist/src/modular/build-classical-operation-groups.d.ts.map +1 -1
  93. package/dist/src/modular/build-classical-operation-groups.js +1 -0
  94. package/dist/src/modular/build-classical-operation-groups.js.map +1 -1
  95. package/dist/src/modular/build-client-context.d.ts +3 -3
  96. package/dist/src/modular/build-client-context.d.ts.map +1 -1
  97. package/dist/src/modular/build-client-context.js +1 -0
  98. package/dist/src/modular/build-client-context.js.map +1 -1
  99. package/dist/src/modular/build-modular-options.d.ts +2 -2
  100. package/dist/src/modular/build-modular-options.d.ts.map +1 -1
  101. package/dist/src/modular/build-operations.d.ts +5 -5
  102. package/dist/src/modular/build-operations.d.ts.map +1 -1
  103. package/dist/src/modular/build-operations.js +7 -4
  104. package/dist/src/modular/build-operations.js.map +1 -1
  105. package/dist/src/modular/build-project-files.d.ts +2 -2
  106. package/dist/src/modular/build-project-files.d.ts.map +1 -1
  107. package/dist/src/modular/build-restore-poller.d.ts +3 -3
  108. package/dist/src/modular/build-restore-poller.d.ts.map +1 -1
  109. package/dist/src/modular/build-restore-poller.js +1 -0
  110. package/dist/src/modular/build-restore-poller.js.map +1 -1
  111. package/dist/src/modular/build-root-index.d.ts +3 -3
  112. package/dist/src/modular/build-root-index.d.ts.map +1 -1
  113. package/dist/src/modular/build-root-index.js +4 -3
  114. package/dist/src/modular/build-root-index.js.map +1 -1
  115. package/dist/src/modular/build-subpath-index.d.ts +2 -2
  116. package/dist/src/modular/build-subpath-index.d.ts.map +1 -1
  117. package/dist/src/modular/build-subpath-index.js +1 -1
  118. package/dist/src/modular/build-subpath-index.js.map +1 -1
  119. package/dist/src/modular/emit-logger-file.d.ts +1 -1
  120. package/dist/src/modular/emit-logger-file.d.ts.map +1 -1
  121. package/dist/src/modular/emit-models-options.d.ts +3 -3
  122. package/dist/src/modular/emit-models-options.d.ts.map +1 -1
  123. package/dist/src/modular/emit-models-options.js.map +1 -1
  124. package/dist/src/modular/emit-models.d.ts +3 -3
  125. package/dist/src/modular/emit-models.d.ts.map +1 -1
  126. package/dist/src/modular/emit-models.js +1 -1
  127. package/dist/src/modular/emit-models.js.map +1 -1
  128. package/dist/src/modular/emit-samples.d.ts +1 -1
  129. package/dist/src/modular/emit-samples.d.ts.map +1 -1
  130. package/dist/src/modular/emit-samples.js +1 -1
  131. package/dist/src/modular/emit-samples.js.map +1 -1
  132. package/dist/src/modular/emit-tests.d.ts +1 -1
  133. package/dist/src/modular/emit-tests.d.ts.map +1 -1
  134. package/dist/src/modular/emit-tests.js +1 -0
  135. package/dist/src/modular/emit-tests.js.map +1 -1
  136. package/dist/src/modular/external-dependencies.d.ts +1 -1
  137. package/dist/src/modular/external-dependencies.d.ts.map +1 -1
  138. package/dist/src/modular/external-dependencies.js +10 -0
  139. package/dist/src/modular/external-dependencies.js.map +1 -1
  140. package/dist/src/modular/helpers/classical-operation-helpers.d.ts +3 -3
  141. package/dist/src/modular/helpers/classical-operation-helpers.d.ts.map +1 -1
  142. package/dist/src/modular/helpers/classical-operation-helpers.js +1 -1
  143. package/dist/src/modular/helpers/classical-operation-helpers.js.map +1 -1
  144. package/dist/src/modular/helpers/client-helpers.d.ts +11 -6
  145. package/dist/src/modular/helpers/client-helpers.d.ts.map +1 -1
  146. package/dist/src/modular/helpers/client-helpers.js +38 -17
  147. package/dist/src/modular/helpers/client-helpers.js.map +1 -1
  148. package/dist/src/modular/helpers/client-option-helpers.d.ts +1 -1
  149. package/dist/src/modular/helpers/client-option-helpers.d.ts.map +1 -1
  150. package/dist/src/modular/helpers/example-value-helpers.d.ts +3 -3
  151. package/dist/src/modular/helpers/example-value-helpers.d.ts.map +1 -1
  152. package/dist/src/modular/helpers/example-value-helpers.js +1 -0
  153. package/dist/src/modular/helpers/example-value-helpers.js.map +1 -1
  154. package/dist/src/modular/helpers/naming-helpers.d.ts +7 -4
  155. package/dist/src/modular/helpers/naming-helpers.d.ts.map +1 -1
  156. package/dist/src/modular/helpers/naming-helpers.js +44 -5
  157. package/dist/src/modular/helpers/naming-helpers.js.map +1 -1
  158. package/dist/src/modular/helpers/operation-helpers.d.ts +7 -7
  159. package/dist/src/modular/helpers/operation-helpers.d.ts.map +1 -1
  160. package/dist/src/modular/helpers/operation-helpers.js +32 -30
  161. package/dist/src/modular/helpers/operation-helpers.js.map +1 -1
  162. package/dist/src/modular/helpers/type-helpers.d.ts +3 -3
  163. package/dist/src/modular/helpers/type-helpers.d.ts.map +1 -1
  164. package/dist/src/modular/interfaces.d.ts +1 -1
  165. package/dist/src/modular/interfaces.d.ts.map +1 -1
  166. package/dist/src/modular/serialization/build-deserializer-function.d.ts +4 -4
  167. package/dist/src/modular/serialization/build-deserializer-function.d.ts.map +1 -1
  168. package/dist/src/modular/serialization/build-deserializer-function.js.map +1 -1
  169. package/dist/src/modular/serialization/build-serializer-function.d.ts +4 -4
  170. package/dist/src/modular/serialization/build-serializer-function.d.ts.map +1 -1
  171. package/dist/src/modular/serialization/build-serializer-function.js.map +1 -1
  172. package/dist/src/modular/serialization/build-xml-serializer-function.d.ts +4 -4
  173. package/dist/src/modular/serialization/build-xml-serializer-function.d.ts.map +1 -1
  174. package/dist/src/modular/serialization/build-xml-serializer-function.js.map +1 -1
  175. package/dist/src/modular/serialization/serialize-utils.d.ts +1 -1
  176. package/dist/src/modular/serialization/serialize-utils.d.ts.map +1 -1
  177. package/dist/src/modular/static-helpers-metadata.d.ts +0 -12
  178. package/dist/src/modular/static-helpers-metadata.d.ts.map +1 -1
  179. package/dist/src/modular/static-helpers-metadata.js +0 -12
  180. package/dist/src/modular/static-helpers-metadata.js.map +1 -1
  181. package/dist/src/modular/type-expressions/get-credential-expression.d.ts +1 -1
  182. package/dist/src/modular/type-expressions/get-credential-expression.d.ts.map +1 -1
  183. package/dist/src/modular/type-expressions/get-enum-expression.d.ts +3 -3
  184. package/dist/src/modular/type-expressions/get-enum-expression.d.ts.map +1 -1
  185. package/dist/src/modular/type-expressions/get-enum-expression.js.map +1 -1
  186. package/dist/src/modular/type-expressions/get-model-expression.d.ts +3 -3
  187. package/dist/src/modular/type-expressions/get-model-expression.d.ts.map +1 -1
  188. package/dist/src/modular/type-expressions/get-nullable-expression.d.ts +3 -3
  189. package/dist/src/modular/type-expressions/get-nullable-expression.d.ts.map +1 -1
  190. package/dist/src/modular/type-expressions/get-nullable-expression.js.map +1 -1
  191. package/dist/src/modular/type-expressions/get-type-expression.d.ts +2 -2
  192. package/dist/src/modular/type-expressions/get-type-expression.d.ts.map +1 -1
  193. package/dist/src/modular/type-expressions/get-union-expression.d.ts +3 -3
  194. package/dist/src/modular/type-expressions/get-union-expression.d.ts.map +1 -1
  195. package/dist/src/modular/type-expressions/get-union-expression.js.map +1 -1
  196. package/dist/src/modular/type-expressions/utils.d.ts +1 -1
  197. package/dist/src/modular/type-expressions/utils.d.ts.map +1 -1
  198. package/dist/src/transform/transform-api-version-info.d.ts +3 -3
  199. package/dist/src/transform/transform-api-version-info.d.ts.map +1 -1
  200. package/dist/src/transform/transform-api-version-info.js +1 -1
  201. package/dist/src/transform/transform-api-version-info.js.map +1 -1
  202. package/dist/src/transform/transform-client-options.d.ts +4 -4
  203. package/dist/src/transform/transform-client-options.d.ts.map +1 -1
  204. package/dist/src/transform/transform-client-options.js +1 -3
  205. package/dist/src/transform/transform-client-options.js.map +1 -1
  206. package/dist/src/transform/transform-helper-function-details.d.ts +3 -3
  207. package/dist/src/transform/transform-helper-function-details.d.ts.map +1 -1
  208. package/dist/src/transform/transform-helper-function-details.js +1 -1
  209. package/dist/src/transform/transform-helper-function-details.js.map +1 -1
  210. package/dist/src/transform/transform-parameters.d.ts +4 -4
  211. package/dist/src/transform/transform-parameters.d.ts.map +1 -1
  212. package/dist/src/transform/transform-parameters.js.map +1 -1
  213. package/dist/src/transform/transform-paths.d.ts +3 -3
  214. package/dist/src/transform/transform-paths.d.ts.map +1 -1
  215. package/dist/src/transform/transform-paths.js +1 -1
  216. package/dist/src/transform/transform-paths.js.map +1 -1
  217. package/dist/src/transform/transform-responses.d.ts +3 -3
  218. package/dist/src/transform/transform-responses.d.ts.map +1 -1
  219. package/dist/src/transform/transform-responses.js +1 -1
  220. package/dist/src/transform/transform-responses.js.map +1 -1
  221. package/dist/src/transform/transform-schemas.d.ts +2 -2
  222. package/dist/src/transform/transform-schemas.d.ts.map +1 -1
  223. package/dist/src/transform/transform-schemas.js +2 -2
  224. package/dist/src/transform/transform-schemas.js.map +1 -1
  225. package/dist/src/transform/transform-telemetry-info.d.ts +2 -2
  226. package/dist/src/transform/transform-telemetry-info.d.ts.map +1 -1
  227. package/dist/src/transform/transform.d.ts +3 -3
  228. package/dist/src/transform/transform.d.ts.map +1 -1
  229. package/dist/src/utils/api-version-util.d.ts +1 -1
  230. package/dist/src/utils/api-version-util.d.ts.map +1 -1
  231. package/dist/src/utils/client-utils.d.ts +4 -4
  232. package/dist/src/utils/client-utils.d.ts.map +1 -1
  233. package/dist/src/utils/credential-utils.d.ts +3 -3
  234. package/dist/src/utils/credential-utils.d.ts.map +1 -1
  235. package/dist/src/utils/credential-utils.js.map +1 -1
  236. package/dist/src/utils/cross-language-def.d.ts +1 -1
  237. package/dist/src/utils/cross-language-def.d.ts.map +1 -1
  238. package/dist/src/utils/emit-util.d.ts +2 -2
  239. package/dist/src/utils/emit-util.d.ts.map +1 -1
  240. package/dist/src/utils/emit-util.js +2 -2
  241. package/dist/src/utils/emit-util.js.map +1 -1
  242. package/dist/src/utils/file-system-utils.d.ts +1 -1
  243. package/dist/src/utils/file-system-utils.d.ts.map +1 -1
  244. package/dist/src/utils/file-system-utils.js.map +1 -1
  245. package/dist/src/utils/import-helper.js +1 -0
  246. package/dist/src/utils/import-helper.js.map +1 -1
  247. package/dist/src/utils/imports-util.d.ts +1 -1
  248. package/dist/src/utils/imports-util.d.ts.map +1 -1
  249. package/dist/src/utils/imports-util.js +2 -1
  250. package/dist/src/utils/imports-util.js.map +1 -1
  251. package/dist/src/utils/interfaces.d.ts +3 -3
  252. package/dist/src/utils/interfaces.d.ts.map +1 -1
  253. package/dist/src/utils/interfaces.js +2 -1
  254. package/dist/src/utils/interfaces.js.map +1 -1
  255. package/dist/src/utils/model-utils.d.ts +4 -4
  256. package/dist/src/utils/model-utils.d.ts.map +1 -1
  257. package/dist/src/utils/name-constructors.d.ts +1 -1
  258. package/dist/src/utils/name-constructors.d.ts.map +1 -1
  259. package/dist/src/utils/namespace-utils.d.ts +2 -2
  260. package/dist/src/utils/namespace-utils.d.ts.map +1 -1
  261. package/dist/src/utils/namespace-utils.js +1 -1
  262. package/dist/src/utils/namespace-utils.js.map +1 -1
  263. package/dist/src/utils/operation-helpers.d.ts +2 -2
  264. package/dist/src/utils/operation-helpers.d.ts.map +1 -1
  265. package/dist/src/utils/operation-helpers.js.map +1 -1
  266. package/dist/src/utils/operation-util.d.ts +5 -5
  267. package/dist/src/utils/operation-util.d.ts.map +1 -1
  268. package/dist/src/utils/operation-util.js +1 -1
  269. package/dist/src/utils/operation-util.js.map +1 -1
  270. package/dist/src/utils/parameter-utils.d.ts +3 -3
  271. package/dist/src/utils/parameter-utils.d.ts.map +1 -1
  272. package/dist/src/utils/parameter-utils.js.map +1 -1
  273. package/dist/src/utils/schema-helpers.d.ts +1 -1
  274. package/dist/src/utils/schema-helpers.d.ts.map +1 -1
  275. package/dist/src/utils/schema-helpers.js +1 -1
  276. package/dist/src/utils/schema-helpers.js.map +1 -1
  277. package/dist/src/utils/type-util.d.ts +1 -1
  278. package/dist/src/utils/type-util.d.ts.map +1 -1
  279. package/dist/tsconfig.tsbuildinfo +1 -1
  280. package/package.json +41 -38
  281. package/src/context-manager.ts +29 -6
  282. package/src/framework/declaration.ts +7 -6
  283. package/src/framework/hooks/binder.ts +5 -33
  284. package/src/framework/hooks/sdk-types.ts +22 -8
  285. package/src/framework/hooks/use-dependencies.ts +1 -1
  286. package/src/framework/load-static-helpers.ts +3 -18
  287. package/src/framework/reference.ts +2 -2
  288. package/src/framework/sample.ts +2 -2
  289. package/src/framework/source-file-batch.ts +2 -2
  290. package/src/index.ts +34 -29
  291. package/src/interfaces.ts +0 -1
  292. package/src/lib.ts +43 -11
  293. package/src/meta-tree.ts +2 -2
  294. package/src/metadata/build-api-extractor-config.ts +1 -1
  295. package/src/metadata/build-changelog-file.ts +1 -1
  296. package/src/metadata/build-es-lint-config.ts +1 -1
  297. package/src/metadata/build-package-file.ts +11 -49
  298. package/src/metadata/build-readme-file.ts +4 -4
  299. package/src/metadata/build-sample-env-file.ts +1 -1
  300. package/src/metadata/build-test-config.ts +1 -1
  301. package/src/metadata/build-ts-config.ts +38 -9
  302. package/src/metadata/build-vitest-config.ts +1 -1
  303. package/src/metadata/build-warp-config.ts +1 -3
  304. package/src/metadata/package-json/azure-package-common.ts +1 -1
  305. package/src/metadata/package-json/build-azure-monorepo-package.ts +3 -20
  306. package/src/metadata/package-json/package-common.ts +0 -15
  307. package/src/metadata/test/build-recorded-client.ts +1 -1
  308. package/src/metadata/test/build-sample-test.ts +1 -1
  309. package/src/metadata/test/build-snippets.ts +1 -1
  310. package/src/metadata/utils.ts +1 -1
  311. package/src/modular/build-classical-client.ts +8 -12
  312. package/src/modular/build-classical-operation-groups.ts +6 -3
  313. package/src/modular/build-client-context.ts +3 -3
  314. package/src/modular/build-modular-options.ts +2 -2
  315. package/src/modular/build-operations.ts +12 -9
  316. package/src/modular/build-project-files.ts +2 -2
  317. package/src/modular/build-restore-poller.ts +6 -3
  318. package/src/modular/build-root-index.ts +9 -10
  319. package/src/modular/build-subpath-index.ts +5 -2
  320. package/src/modular/emit-logger-file.ts +1 -1
  321. package/src/modular/emit-models-options.ts +6 -3
  322. package/src/modular/emit-models.ts +23 -33
  323. package/src/modular/emit-samples.ts +11 -11
  324. package/src/modular/emit-tests.ts +3 -3
  325. package/src/modular/external-dependencies.ts +11 -1
  326. package/src/modular/helpers/classical-operation-helpers.ts +10 -7
  327. package/src/modular/helpers/client-helpers.ts +52 -32
  328. package/src/modular/helpers/client-option-helpers.ts +1 -1
  329. package/src/modular/helpers/example-value-helpers.ts +9 -9
  330. package/src/modular/helpers/naming-helpers.ts +55 -7
  331. package/src/modular/helpers/operation-helpers.ts +56 -54
  332. package/src/modular/helpers/type-helpers.ts +3 -3
  333. package/src/modular/interfaces.ts +1 -1
  334. package/src/modular/serialization/build-deserializer-function.ts +9 -9
  335. package/src/modular/serialization/build-serializer-function.ts +9 -9
  336. package/src/modular/serialization/build-xml-serializer-function.ts +7 -7
  337. package/src/modular/serialization/serialize-utils.ts +1 -1
  338. package/src/modular/static-helpers-metadata.ts +0 -13
  339. package/src/modular/type-expressions/get-credential-expression.ts +1 -1
  340. package/src/modular/type-expressions/get-enum-expression.ts +3 -3
  341. package/src/modular/type-expressions/get-model-expression.ts +3 -3
  342. package/src/modular/type-expressions/get-nullable-expression.ts +3 -3
  343. package/src/modular/type-expressions/get-type-expression.ts +2 -2
  344. package/src/modular/type-expressions/get-union-expression.ts +3 -3
  345. package/src/modular/type-expressions/utils.ts +1 -1
  346. package/src/transform/transform-api-version-info.ts +8 -3
  347. package/src/transform/transform-client-options.ts +5 -7
  348. package/src/transform/transform-helper-function-details.ts +6 -3
  349. package/src/transform/transform-parameters.ts +15 -11
  350. package/src/transform/transform-paths.ts +10 -4
  351. package/src/transform/transform-responses.ts +11 -8
  352. package/src/transform/transform-schemas.ts +7 -4
  353. package/src/transform/transform-telemetry-info.ts +3 -3
  354. package/src/transform/transform.ts +11 -11
  355. package/src/utils/api-version-util.ts +1 -1
  356. package/src/utils/client-utils.ts +8 -8
  357. package/src/utils/credential-utils.ts +3 -3
  358. package/src/utils/cross-language-def.ts +1 -1
  359. package/src/utils/emit-util.ts +9 -3
  360. package/src/utils/file-system-utils.ts +1 -1
  361. package/src/utils/imports-util.ts +2 -2
  362. package/src/utils/interfaces.ts +3 -3
  363. package/src/utils/model-utils.ts +23 -23
  364. package/src/utils/name-constructors.ts +1 -1
  365. package/src/utils/namespace-utils.ts +8 -2
  366. package/src/utils/operation-helpers.ts +11 -7
  367. package/src/utils/operation-util.ts +23 -16
  368. package/src/utils/parameter-utils.ts +4 -4
  369. package/src/utils/schema-helpers.ts +7 -1
  370. package/src/utils/type-util.ts +1 -1
  371. package/static/static-helpers/multipartHelpers.ts +2 -6
  372. package/static/static-helpers/platform-types-browser.mts +0 -5
  373. package/static/static-helpers/platform-types-react-native.mts +0 -5
  374. package/static/static-helpers/platform-types.ts +0 -7
  375. package/static/static-helpers/serialization/get-binary-stream-response-browser.mts +0 -22
  376. package/static/static-helpers/serialization/get-binary-stream-response-react-native.mts +0 -1
  377. package/static/static-helpers/serialization/get-binary-stream-response.ts +0 -22
@@ -1,12 +1,17 @@
1
1
  import {
2
2
  getHttpOperationWithCache,
3
3
  isApiVersion,
4
- SdkClient,
4
+ type SdkClient,
5
5
  } from "@azure-tools/typespec-client-generator-core";
6
- import { ApiVersionInfo, ApiVersionPosition, SchemaContext, UrlInfo } from "../interfaces.js";
6
+ import {
7
+ type ApiVersionInfo,
8
+ type ApiVersionPosition,
9
+ SchemaContext,
10
+ type UrlInfo,
11
+ } from "../interfaces.js";
7
12
  import { extractDefinedPosition, extractPathApiVersion } from "../utils/api-version-util.js";
8
13
  import { listOperationsUnderClient } from "../utils/client-utils.js";
9
- import { SdkContext } from "../utils/interfaces.js";
14
+ import type { SdkContext } from "../utils/interfaces.js";
10
15
  import { getDefaultApiVersionString, getSchemaForType, trimUsage } from "../utils/model-utils.js";
11
16
 
12
17
  export function transformApiVersionInfo(
@@ -1,12 +1,12 @@
1
1
  import { getHttpOperationWithCache } from "@azure-tools/typespec-client-generator-core";
2
- import { getDoc, NoTarget, Program } from "@typespec/compiler";
2
+ import { getDoc, NoTarget, type Program } from "@typespec/compiler";
3
3
  import { getAuthentication } from "@typespec/http";
4
- import { ClientOptions, PackageDetails, ServiceInfo } from "../interfaces.js";
5
- import { EmitterOptions, reportDiagnostic } from "../lib.js";
4
+ import type { ClientOptions, PackageDetails, ServiceInfo } from "../interfaces.js";
5
+ import { type EmitterOptions, reportDiagnostic } from "../lib.js";
6
6
  import { getClientParameters } from "../modular/helpers/client-helpers.js";
7
7
  import { getClients, listOperationsUnderClient } from "../utils/client-utils.js";
8
8
  import { getSupportedHttpAuth } from "../utils/credential-utils.js";
9
- import { SdkContext } from "../utils/interfaces.js";
9
+ import type { SdkContext } from "../utils/interfaces.js";
10
10
  import { getDefaultService } from "../utils/model-utils.js";
11
11
  import { NameType, normalizeName, pascalCase } from "../utils/name-utils.js";
12
12
  import { detectModelConflicts } from "../utils/namespace-utils.js";
@@ -232,14 +232,12 @@ function buildPackageDetails(program: Program, emitterOptions: EmitterOptions):
232
232
  nameWithoutScope: "unamedpackage",
233
233
  version: "1.0.0-beta.1",
234
234
  };
235
- const isVersionUserProvided = Boolean(emitterOptions["package-details"]?.version);
236
235
  const packageDetails: PackageDetails = {
237
236
  ...emitterOptions["package-details"],
238
237
  name:
239
238
  emitterOptions["package-details"]?.name ??
240
239
  normalizeName(getDefaultService(program)?.title ?? "", NameType.Class),
241
- version: emitterOptions["package-details"]?.version ?? "1.0.0-beta.1",
242
- isVersionUserProvided,
240
+ version: emitterOptions["package-details"]?.version,
243
241
  };
244
242
  if (emitterOptions["package-details"]?.name) {
245
243
  const nameParts = emitterOptions["package-details"]?.name.split("/");
@@ -1,7 +1,10 @@
1
- import { getHttpOperationWithCache, SdkClient } from "@azure-tools/typespec-client-generator-core";
2
- import { HelperFunctionDetails } from "../interfaces.js";
1
+ import {
2
+ getHttpOperationWithCache,
3
+ type SdkClient,
4
+ } from "@azure-tools/typespec-client-generator-core";
5
+ import type { HelperFunctionDetails } from "../interfaces.js";
3
6
  import { listOperationsUnderClient } from "../utils/client-utils.js";
4
- import { SdkContext } from "../utils/interfaces.js";
7
+ import type { SdkContext } from "../utils/interfaces.js";
5
8
  import { getCollectionFormat } from "../utils/model-utils.js";
6
9
  import {
7
10
  extractPageDetails,
@@ -2,25 +2,29 @@
2
2
  // Licensed under the MIT License.
3
3
 
4
4
  import {
5
- SdkClient,
5
+ type SdkClient,
6
6
  getHttpOperationWithCache,
7
7
  isApiVersion,
8
8
  } from "@azure-tools/typespec-client-generator-core";
9
- import { NoTarget, Type, isVoidType } from "@typespec/compiler";
10
- import { HttpOperation, HttpOperationParameter, HttpOperationParameters } from "@typespec/http";
9
+ import { NoTarget, type Type, isVoidType } from "@typespec/compiler";
10
+ import type {
11
+ HttpOperation,
12
+ HttpOperationParameter,
13
+ HttpOperationParameters,
14
+ } from "@typespec/http";
11
15
  import {
12
- ApiVersionInfo,
13
- Imports,
14
- ObjectSchema,
15
- OperationParameter,
16
- ParameterBodyMetadata,
17
- ParameterMetadata,
18
- Schema,
16
+ type ApiVersionInfo,
17
+ type Imports,
18
+ type ObjectSchema,
19
+ type OperationParameter,
20
+ type ParameterBodyMetadata,
21
+ type ParameterMetadata,
22
+ type Schema,
19
23
  SchemaContext,
20
24
  } from "../interfaces.js";
21
25
  import { reportDiagnostic } from "../lib.js";
22
26
  import { listOperationsUnderClient } from "../utils/client-utils.js";
23
- import { SdkContext } from "../utils/interfaces.js";
27
+ import type { SdkContext } from "../utils/interfaces.js";
24
28
  import {
25
29
  KnownMediaType,
26
30
  extractMediaTypes,
@@ -2,11 +2,11 @@
2
2
  // Licensed under the MIT License.
3
3
 
4
4
  import {
5
- SdkClient,
5
+ type SdkClient,
6
6
  getHttpOperationWithCache,
7
7
  isApiVersion,
8
8
  } from "@azure-tools/typespec-client-generator-core";
9
- import { HttpOperation, HttpOperationParameters } from "@typespec/http";
9
+ import type { HttpOperation, HttpOperationParameters } from "@typespec/http";
10
10
  import { getImportedModelName, getSchemaForType, isBodyRequired } from "../utils/model-utils.js";
11
11
  import {
12
12
  extractOperationLroDetail,
@@ -20,9 +20,15 @@ import {
20
20
  } from "../utils/operation-util.js";
21
21
 
22
22
  import { getDoc } from "@typespec/compiler";
23
- import { Imports, OperationMethod, PathMetadata, Paths, SchemaContext } from "../interfaces.js";
23
+ import {
24
+ type Imports,
25
+ type OperationMethod,
26
+ type PathMetadata,
27
+ type Paths,
28
+ SchemaContext,
29
+ } from "../interfaces.js";
24
30
  import { listOperationsUnderClient } from "../utils/client-utils.js";
25
- import { SdkContext } from "../utils/interfaces.js";
31
+ import type { SdkContext } from "../utils/interfaces.js";
26
32
  import { getParameterTypeName, getResponseTypeName } from "../utils/name-constructors.js";
27
33
  import { getParameterSerializationInfo } from "../utils/parameter-utils.js";
28
34
 
@@ -1,19 +1,22 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT License.
3
3
 
4
- import { getHttpOperationWithCache, SdkClient } from "@azure-tools/typespec-client-generator-core";
4
+ import {
5
+ getHttpOperationWithCache,
6
+ type SdkClient,
7
+ } from "@azure-tools/typespec-client-generator-core";
5
8
  import { getDoc, isVoidType } from "@typespec/compiler";
6
- import { HttpOperation, HttpOperationResponse } from "@typespec/http";
9
+ import type { HttpOperation, HttpOperationResponse } from "@typespec/http";
7
10
  import {
8
- Imports,
9
- OperationResponse,
10
- ResponseHeaderSchema,
11
- ResponseMetadata,
12
- Schema,
11
+ type Imports,
12
+ type OperationResponse,
13
+ type ResponseHeaderSchema,
14
+ type ResponseMetadata,
15
+ type Schema,
13
16
  SchemaContext,
14
17
  } from "../interfaces.js";
15
18
  import { listOperationsUnderClient } from "../utils/client-utils.js";
16
- import { SdkContext } from "../utils/interfaces.js";
19
+ import type { SdkContext } from "../utils/interfaces.js";
17
20
  import {
18
21
  getBinaryType,
19
22
  getImportedModelName,
@@ -1,9 +1,12 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT License.
3
3
 
4
- import { SdkClient, getHttpOperationWithCache } from "@azure-tools/typespec-client-generator-core";
5
- import { Model, Type } from "@typespec/compiler";
6
- import { HttpOperation, getServers } from "@typespec/http";
4
+ import {
5
+ type SdkClient,
6
+ getHttpOperationWithCache,
7
+ } from "@azure-tools/typespec-client-generator-core";
8
+ import type { Model, Type } from "@typespec/compiler";
9
+ import { type HttpOperation, getServers } from "@typespec/http";
7
10
  import { KnownMediaType, extractMediaTypes } from "../utils/media-types.js";
8
11
  import {
9
12
  getBodyType,
@@ -17,7 +20,7 @@ import {
17
20
  import { useContext } from "../context-manager.js";
18
21
  import { SchemaContext } from "../interfaces.js";
19
22
  import { listOperationsUnderClient } from "../utils/client-utils.js";
20
- import { SdkContext } from "../utils/interfaces.js";
23
+ import type { SdkContext } from "../utils/interfaces.js";
21
24
 
22
25
  export function transformSchemas(client: SdkClient, dpgContext: SdkContext) {
23
26
  const program = dpgContext.program;
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  getHttpOperationWithCache,
3
- SdkClient,
4
- SdkContext,
3
+ type SdkClient,
4
+ type SdkContext,
5
5
  } from "@azure-tools/typespec-client-generator-core";
6
- import { TelemetryInfo } from "../interfaces.js";
6
+ import type { TelemetryInfo } from "../interfaces.js";
7
7
  import { listOperationsUnderClient } from "../utils/client-utils.js";
8
8
  import { getCustomRequestHeaderNameForOperation } from "../utils/operation-util.js";
9
9
 
@@ -1,23 +1,23 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT License.
3
3
 
4
- import { SdkClient } from "@azure-tools/typespec-client-generator-core";
4
+ import type { SdkClient } from "@azure-tools/typespec-client-generator-core";
5
5
  import { getDoc, joinPaths } from "@typespec/compiler";
6
6
  import { getServers } from "@typespec/http";
7
7
  import {
8
- ClientModel,
9
- ClientOptions,
10
- Imports,
11
- OperationParameter,
12
- OperationResponse,
13
- PathParameter,
14
- Paths,
15
- Schema,
8
+ type ClientModel,
9
+ type ClientOptions,
10
+ type Imports,
11
+ type OperationParameter,
12
+ type OperationResponse,
13
+ type PathParameter,
14
+ type Paths,
15
+ type Schema,
16
16
  SchemaContext,
17
- UrlInfo,
17
+ type UrlInfo,
18
18
  } from "../interfaces.js";
19
19
  import { buildRuntimeImports, initInternalImports } from "../utils/imports-util.js";
20
- import { SdkContext } from "../utils/interfaces.js";
20
+ import type { SdkContext } from "../utils/interfaces.js";
21
21
  import {
22
22
  getDefaultService,
23
23
  getFormattedPropertyDoc,
@@ -1,4 +1,4 @@
1
- import { ApiVersionInfo, ApiVersionPosition, UrlInfo } from "../interfaces.js";
1
+ import type { ApiVersionInfo, ApiVersionPosition, UrlInfo } from "../interfaces.js";
2
2
 
3
3
  /**
4
4
  * Extract the path api-version detail from UrlInfo, return undefined if no valid api-version parameter
@@ -2,20 +2,20 @@ import {
2
2
  InitializedByFlags,
3
3
  listAllServiceNamespaces,
4
4
  listClients,
5
- SdkClient,
6
- SdkClientType,
7
- SdkServiceOperation,
5
+ type SdkClient,
6
+ type SdkClientType,
7
+ type SdkServiceOperation,
8
8
  } from "@azure-tools/typespec-client-generator-core";
9
9
  import {
10
10
  getNamespaceFullName,
11
- Interface,
11
+ type Interface,
12
12
  isTemplateDeclaration,
13
13
  isTemplateDeclarationOrInstance,
14
- Namespace,
15
- Operation,
14
+ type Namespace,
15
+ type Operation,
16
16
  } from "@typespec/compiler";
17
- import { ClientModuleInfo } from "../modular/interfaces.js";
18
- import { SdkContext } from "./interfaces.js";
17
+ import type { ClientModuleInfo } from "../modular/interfaces.js";
18
+ import type { SdkContext } from "./interfaces.js";
19
19
  import { NameType, normalizeName } from "./name-utils.js";
20
20
 
21
21
  export function getClients(dpgContext: SdkContext): SdkClient[] {
@@ -1,6 +1,6 @@
1
- import { SdkClientInitializationType } from "@azure-tools/typespec-client-generator-core";
2
- import { NoTarget, Program } from "@typespec/compiler";
3
- import { Authentication, HttpAuth } from "@typespec/http";
1
+ import type { SdkClientInitializationType } from "@azure-tools/typespec-client-generator-core";
2
+ import { NoTarget, type Program } from "@typespec/compiler";
3
+ import type { Authentication, HttpAuth } from "@typespec/http";
4
4
  import { reportDiagnostic } from "../lib.js";
5
5
 
6
6
  /**
@@ -3,7 +3,7 @@
3
3
 
4
4
  import { UsageFlags } from "@azure-tools/typespec-client-generator-core";
5
5
  import { transformModularEmitterOptions } from "../modular/build-modular-options.js";
6
- import { SdkContext } from "./interfaces.js";
6
+ import type { SdkContext } from "./interfaces.js";
7
7
  import { NameType, normalizeName } from "./name-utils.js";
8
8
  import { getMethodHierarchiesMap } from "./operation-util.js";
9
9
 
@@ -1,9 +1,15 @@
1
- import { CompilerHost, getDirectoryPath, joinPaths, NoTarget, Program } from "@typespec/compiler";
1
+ import {
2
+ type CompilerHost,
3
+ getDirectoryPath,
4
+ joinPaths,
5
+ NoTarget,
6
+ type Program,
7
+ } from "@typespec/compiler";
2
8
  import { format } from "prettier";
3
9
  import prettierPluginBabel from "prettier/plugins/babel";
4
10
  import prettierPluginEstree from "prettier/plugins/estree";
5
11
  import prettierPluginTypescript from "prettier/plugins/typescript";
6
- import { ClientModel, ContentBuilder, File } from "../interfaces.js";
12
+ import type { ClientModel, ContentBuilder, File } from "../interfaces.js";
7
13
  import { prettierJSONOptions, prettierTypeScriptOptions, reportDiagnostic } from "../lib.js";
8
14
 
9
15
  export async function emitContentByBuilder(
@@ -36,7 +42,7 @@ async function emitFile(file: File, program: Program, emitterOutputDir?: string)
36
42
  const host: CompilerHost = program.host;
37
43
  const filePath = joinPaths(emitterOutputDir ?? "", file.path);
38
44
  const isJson = /\.json$/gi.test(filePath);
39
- const isSourceCode = /\.(ts|js)$/gi.test(filePath);
45
+ const isSourceCode = /\.(m|c)?(ts|js)$/gi.test(filePath);
40
46
  const licenseHeader = `// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n`;
41
47
  let prettierFileContent = file.content;
42
48
 
@@ -1,4 +1,4 @@
1
- import { NoTarget, Program, resolvePath, type CompilerHost } from "@typespec/compiler";
1
+ import { NoTarget, resolvePath, type CompilerHost, type Program } from "@typespec/compiler";
2
2
  import { reportDiagnostic } from "../lib.js";
3
3
 
4
4
  export async function pathExists(host: CompilerHost, targetPath: string): Promise<boolean> {
@@ -1,5 +1,5 @@
1
1
  import { SourceFile } from "ts-morph";
2
- import { ImportType, Imports } from "../interfaces.js";
2
+ import type { ImportType, Imports } from "../interfaces.js";
3
3
 
4
4
  /**
5
5
  * Build the common imports for generated SDK. Azure Core packages are always used.
@@ -10,7 +10,7 @@ export function buildRuntimeImports(): Imports {
10
10
  restClient: {
11
11
  type: "restClient",
12
12
  specifier: "@azure-rest/core-client",
13
- version: "^2.0.0",
13
+ version: "^2.7.0",
14
14
  },
15
15
  coreAuth: {
16
16
  type: "coreAuth",
@@ -1,6 +1,6 @@
1
- import { SdkContext as TCGCSdkContext } from "@azure-tools/typespec-client-generator-core";
2
- import { ModelProperty, Namespace } from "@typespec/compiler";
3
- import { ClientOptions, SchemaContext } from "../interfaces.js";
1
+ import type { SdkContext as TCGCSdkContext } from "@azure-tools/typespec-client-generator-core";
2
+ import type { ModelProperty, Namespace } from "@typespec/compiler";
3
+ import { type ClientOptions, SchemaContext } from "../interfaces.js";
4
4
  import { KnownMediaType } from "./media-types.js";
5
5
 
6
6
  export interface SdkContext extends TCGCSdkContext {
@@ -8,20 +8,20 @@ import {
8
8
  isApiVersion,
9
9
  } from "@azure-tools/typespec-client-generator-core";
10
10
  import {
11
- Discriminator,
12
- EncodeData,
13
- Enum,
14
- EnumMember,
15
- Model,
16
- ModelProperty,
11
+ type Discriminator,
12
+ type EncodeData,
13
+ type Enum,
14
+ type EnumMember,
15
+ type Model,
16
+ type ModelProperty,
17
17
  NoTarget,
18
- Program,
19
- Scalar,
20
- Service,
21
- Type,
22
- Union,
23
- UnionVariant,
24
- Value,
18
+ type Program,
19
+ type Scalar,
20
+ type Service,
21
+ type Type,
22
+ type Union,
23
+ type UnionVariant,
24
+ type Value,
25
25
  getDiscriminator,
26
26
  getDoc,
27
27
  getEffectiveModelType,
@@ -50,11 +50,11 @@ import {
50
50
  listServices,
51
51
  } from "@typespec/compiler";
52
52
  import {
53
- HttpOperation,
54
- HttpOperationHeaderParameter,
55
- HttpOperationParameters,
56
- HttpOperationPathParameter,
57
- HttpOperationQueryParameter,
53
+ type HttpOperation,
54
+ type HttpOperationHeaderParameter,
55
+ type HttpOperationParameters,
56
+ type HttpOperationPathParameter,
57
+ type HttpOperationQueryParameter,
58
58
  Visibility,
59
59
  getHeaderFieldName,
60
60
  getHttpFileModel,
@@ -64,14 +64,14 @@ import {
64
64
  isBody,
65
65
  isStatusCode,
66
66
  } from "@typespec/http";
67
- import { GetSchemaOptions, SdkContext } from "./interfaces.js";
67
+ import type { GetSchemaOptions, SdkContext } from "./interfaces.js";
68
68
  import { KnownMediaType, hasMediaType, isMediaTypeMultipartFormData } from "./media-types.js";
69
69
 
70
70
  import {
71
- ArraySchema,
72
- DictionarySchema,
73
- ObjectSchema,
74
- Schema,
71
+ type ArraySchema,
72
+ type DictionarySchema,
73
+ type ObjectSchema,
74
+ type Schema,
75
75
  SchemaContext,
76
76
  } from "../interfaces.js";
77
77
  import { reportDiagnostic } from "../lib.js";
@@ -1,7 +1,7 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT License.
3
3
 
4
- import { ClientModel } from "../interfaces.js";
4
+ import type { ClientModel } from "../interfaces.js";
5
5
  import { NameType, normalizeName } from "./name-utils.js";
6
6
 
7
7
  /**
@@ -1,7 +1,13 @@
1
1
  import { getAllModels, UsageFlags } from "@azure-tools/typespec-client-generator-core";
2
- import { isGlobalNamespace, isService, Namespace, NoTarget, Operation } from "@typespec/compiler";
2
+ import {
3
+ isGlobalNamespace,
4
+ isService,
5
+ type Namespace,
6
+ NoTarget,
7
+ type Operation,
8
+ } from "@typespec/compiler";
3
9
  import { reportDiagnostic } from "../lib.js";
4
- import { SdkContext } from "./interfaces.js";
10
+ import type { SdkContext } from "./interfaces.js";
5
11
 
6
12
  export function getModelNamespaceName(dpgContext: SdkContext, namespace: Namespace): string[] {
7
13
  const result: string[] = [];
@@ -1,14 +1,18 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT License.
3
3
 
4
- import { MethodSignatureStructure, OptionalKind, ParameterDeclarationStructure } from "ts-morph";
4
+ import type {
5
+ MethodSignatureStructure,
6
+ OptionalKind,
7
+ ParameterDeclarationStructure,
8
+ } from "ts-morph";
5
9
  import {
6
- ClientModel,
7
- Methods,
8
- ObjectSchema,
9
- ParameterMetadata,
10
- PathParameter,
11
- Schema,
10
+ type ClientModel,
11
+ type Methods,
12
+ type ObjectSchema,
13
+ type ParameterMetadata,
14
+ type PathParameter,
15
+ type Schema,
12
16
  SchemaContext,
13
17
  } from "../interfaces.js";
14
18
  import { NameType, normalizeName, pascalCase } from "./name-utils.js";
@@ -7,19 +7,26 @@ import {
7
7
  getHttpOperationWithCache,
8
8
  getWireName,
9
9
  InitializedByFlags,
10
- SdkBodyParameter,
11
- SdkClient,
12
- SdkClientType,
13
- SdkHttpOperation,
14
- SdkHttpParameter,
15
- SdkMethod,
16
- SdkMethodParameter,
17
- SdkServiceMethod,
18
- SdkServiceOperation,
10
+ type SdkBodyParameter,
11
+ type SdkClient,
12
+ type SdkClientType,
13
+ type SdkHttpOperation,
14
+ type SdkHttpParameter,
15
+ type SdkMethod,
16
+ type SdkMethodParameter,
17
+ type SdkServiceMethod,
18
+ type SdkServiceOperation,
19
19
  } from "@azure-tools/typespec-client-generator-core";
20
- import { isList, ModelProperty, NoTarget, Operation, Program, Type } from "@typespec/compiler";
21
- import { $ } from "@typespec/compiler/typekit";
22
20
  import {
21
+ isList,
22
+ type ModelProperty,
23
+ NoTarget,
24
+ type Operation,
25
+ type Program,
26
+ type Type,
27
+ } from "@typespec/compiler";
28
+ import { $ } from "@typespec/compiler/typekit";
29
+ import type {
23
30
  HttpOperation,
24
31
  HttpOperationParameter,
25
32
  HttpOperationResponse,
@@ -29,15 +36,15 @@ import { resolveReference } from "../framework/reference.js";
29
36
  import {
30
37
  OPERATION_LRO_HIGH_PRIORITY,
31
38
  OPERATION_LRO_LOW_PRIORITY,
32
- OperationLroDetail,
33
- Paths,
34
- ResponseMetadata,
35
- ResponseTypes,
39
+ type OperationLroDetail,
40
+ type Paths,
41
+ type ResponseMetadata,
42
+ type ResponseTypes,
36
43
  } from "../interfaces.js";
37
44
  import { reportDiagnostic } from "../lib.js";
38
45
  import { SerializationHelpers } from "../modular/static-helpers-metadata.js";
39
46
  import { listOperationsUnderClient } from "./client-utils.js";
40
- import { SdkContext } from "./interfaces.js";
47
+ import type { SdkContext } from "./interfaces.js";
41
48
  import {
42
49
  isMediaTypeMultipart,
43
50
  isMediaTypeXml,
@@ -1,8 +1,8 @@
1
- import { getEncode, NoTarget, Program } from "@typespec/compiler";
2
- import { HttpOperationParameter } from "@typespec/http";
3
- import { Schema, SchemaContext } from "../interfaces.js";
1
+ import { getEncode, NoTarget, type Program } from "@typespec/compiler";
2
+ import type { HttpOperationParameter } from "@typespec/http";
3
+ import { type Schema, SchemaContext } from "../interfaces.js";
4
4
  import { reportDiagnostic } from "../lib.js";
5
- import { SdkContext } from "./interfaces.js";
5
+ import type { SdkContext } from "./interfaces.js";
6
6
  import { getTypeName, isArrayType, isObjectOrDictType } from "./model-utils.js";
7
7
  import { NameType, normalizeName } from "./name-utils.js";
8
8
 
@@ -1,7 +1,13 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT License.
3
3
 
4
- import { ArraySchema, ClientModel, ObjectSchema, Schema, SchemaContext } from "../interfaces.js";
4
+ import {
5
+ type ArraySchema,
6
+ type ClientModel,
7
+ type ObjectSchema,
8
+ type Schema,
9
+ SchemaContext,
10
+ } from "../interfaces.js";
5
11
 
6
12
  export interface IsDictionaryOptions {
7
13
  filterEmpty?: boolean;
@@ -1,7 +1,7 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT License.
3
3
 
4
- import { Schema } from "../interfaces.js";
4
+ import type { Schema } from "../interfaces.js";
5
5
 
6
6
  export function isRecord(type: string) {
7
7
  return /^Record<([a-zA-Z]+),(\s*)(?<type>.+)>$/.test(type);
@@ -1,14 +1,10 @@
1
- import { NodeReadableStream } from "./platform-types.js";
1
+ import { NodeReadableStream } from "@azure/core-rest-pipeline";
2
2
 
3
3
  /**
4
4
  * Valid values for the contents of a binary file.
5
5
  */
6
6
  export type FileContents =
7
- | string
8
- | NodeReadableStream
9
- | ReadableStream<Uint8Array>
10
- | Uint8Array
11
- | Blob;
7
+ string | NodeReadableStream | ReadableStream<Uint8Array> | Uint8Array | Blob;
12
8
 
13
9
  export function createFilePartDescriptor(
14
10
  partName: string,
@@ -1,5 +0,0 @@
1
- /**
2
- * Browser platform variant — NodeReadableStream resolves to `never`
3
- * so it drops out of union types and optional properties become effectively absent.
4
- */
5
- export type NodeReadableStream = never;
@@ -1,5 +0,0 @@
1
- /**
2
- * React Native platform variant — NodeReadableStream resolves to `never`
3
- * so it drops out of union types and optional properties become effectively absent.
4
- */
5
- export type NodeReadableStream = never;
@@ -1,7 +0,0 @@
1
- /**
2
- * Type alias for Node.js ReadableStream.
3
- * On Node targets this resolves to the actual NodeJS.ReadableStream type.
4
- * On browser/react-native targets the platform variant resolves to `never`,
5
- * which drops out of union types naturally.
6
- */
7
- export type NodeReadableStream = NodeJS.ReadableStream;