@goast/kotlin 0.7.0-beta.2 → 0.7.1

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 (132) hide show
  1. package/dist/src/assets.d.ts +17 -0
  2. package/dist/src/assets.js +17 -0
  3. package/dist/src/ast/common.d.ts +4 -0
  4. package/dist/src/ast/node.d.ts +11 -0
  5. package/dist/src/ast/node.js +11 -0
  6. package/dist/src/ast/nodes/annotation.d.ts +44 -0
  7. package/dist/src/ast/nodes/annotation.js +40 -0
  8. package/dist/src/ast/nodes/argument.d.ts +33 -0
  9. package/dist/src/ast/nodes/argument.js +33 -0
  10. package/dist/src/ast/nodes/call.d.ts +42 -0
  11. package/dist/src/ast/nodes/call.js +42 -0
  12. package/dist/src/ast/nodes/class.d.ts +96 -0
  13. package/dist/src/ast/nodes/class.js +90 -0
  14. package/dist/src/ast/nodes/collection-literal.d.ts +35 -0
  15. package/dist/src/ast/nodes/collection-literal.js +35 -0
  16. package/dist/src/ast/nodes/constructor.d.ts +65 -0
  17. package/dist/src/ast/nodes/constructor.js +62 -0
  18. package/dist/src/ast/nodes/doc-tag.d.ts +41 -0
  19. package/dist/src/ast/nodes/doc-tag.js +41 -0
  20. package/dist/src/ast/nodes/doc.d.ts +44 -0
  21. package/dist/src/ast/nodes/doc.js +44 -0
  22. package/dist/src/ast/nodes/enum-value.d.ts +50 -0
  23. package/dist/src/ast/nodes/enum-value.js +47 -0
  24. package/dist/src/ast/nodes/enum.d.ts +67 -0
  25. package/dist/src/ast/nodes/enum.js +64 -0
  26. package/dist/src/ast/nodes/function.d.ts +105 -0
  27. package/dist/src/ast/nodes/function.js +105 -0
  28. package/dist/src/ast/nodes/generic-parameter.d.ts +37 -0
  29. package/dist/src/ast/nodes/generic-parameter.js +37 -0
  30. package/dist/src/ast/nodes/init-block.d.ts +32 -0
  31. package/dist/src/ast/nodes/init-block.js +32 -0
  32. package/dist/src/ast/nodes/interface.d.ts +73 -0
  33. package/dist/src/ast/nodes/interface.js +68 -0
  34. package/dist/src/ast/nodes/lambda-type.d.ts +42 -0
  35. package/dist/src/ast/nodes/lambda-type.js +42 -0
  36. package/dist/src/ast/nodes/lambda.d.ts +41 -0
  37. package/dist/src/ast/nodes/lambda.js +41 -0
  38. package/dist/src/ast/nodes/object.d.ts +66 -0
  39. package/dist/src/ast/nodes/object.js +62 -0
  40. package/dist/src/ast/nodes/parameter.d.ts +68 -0
  41. package/dist/src/ast/nodes/parameter.js +68 -0
  42. package/dist/src/ast/nodes/property.d.ts +152 -0
  43. package/dist/src/ast/nodes/property.js +148 -0
  44. package/dist/src/ast/nodes/reference.d.ts +107 -0
  45. package/dist/src/ast/nodes/reference.js +75 -0
  46. package/dist/src/ast/nodes/string.d.ts +57 -0
  47. package/dist/src/ast/nodes/string.js +57 -0
  48. package/dist/src/ast/nodes/types.d.ts +9 -0
  49. package/dist/src/ast/references/jackson.d.ts +67 -0
  50. package/dist/src/ast/references/jackson.js +59 -0
  51. package/dist/src/ast/references/jakarta.d.ts +13 -0
  52. package/dist/src/ast/references/jakarta.js +13 -0
  53. package/dist/src/ast/references/java.d.ts +19 -0
  54. package/dist/src/ast/references/java.js +19 -0
  55. package/dist/src/ast/references/kotlin.d.ts +28 -0
  56. package/dist/src/ast/references/kotlin.js +28 -0
  57. package/dist/src/ast/references/kotlinx.d.ts +8 -0
  58. package/dist/src/ast/references/kotlinx.js +8 -0
  59. package/dist/src/ast/references/okhttp3.d.ts +8 -0
  60. package/dist/src/ast/references/okhttp3.js +8 -0
  61. package/dist/src/ast/references/reactor.d.ts +8 -0
  62. package/dist/src/ast/references/reactor.js +8 -0
  63. package/dist/src/ast/references/spring-reactive.d.ts +18 -0
  64. package/dist/src/ast/references/spring-reactive.js +18 -0
  65. package/dist/src/ast/references/spring.d.ts +27 -0
  66. package/dist/src/ast/references/spring.js +27 -0
  67. package/dist/src/ast/references/swagger.d.ts +13 -0
  68. package/dist/src/ast/references/swagger.js +13 -0
  69. package/dist/src/ast/utils/get-kotlin-builder-options.d.ts +10 -0
  70. package/dist/src/ast/utils/get-kotlin-builder-options.js +10 -0
  71. package/dist/src/ast/utils/to-kt-node.d.ts +40 -0
  72. package/dist/src/ast/utils/write-kt-annotations.d.ts +13 -0
  73. package/dist/src/ast/utils/write-kt-annotations.js +13 -0
  74. package/dist/src/ast/utils/write-kt-arguments.d.ts +15 -0
  75. package/dist/src/ast/utils/write-kt-arguments.js +15 -0
  76. package/dist/src/ast/utils/write-kt-enum-values.d.ts +13 -0
  77. package/dist/src/ast/utils/write-kt-enum-values.js +13 -0
  78. package/dist/src/ast/utils/write-kt-generic-parameters.d.ts +10 -0
  79. package/dist/src/ast/utils/write-kt-generic-parameters.js +10 -0
  80. package/dist/src/ast/utils/write-kt-members.d.ts +16 -0
  81. package/dist/src/ast/utils/write-kt-members.js +16 -0
  82. package/dist/src/ast/utils/write-kt-node.d.ts +29 -0
  83. package/dist/src/ast/utils/write-kt-node.js +24 -0
  84. package/dist/src/ast/utils/write-kt-parameters.d.ts +13 -0
  85. package/dist/src/ast/utils/write-kt-parameters.js +13 -0
  86. package/dist/src/common-results.d.ts +9 -0
  87. package/dist/src/config.d.ts +72 -0
  88. package/dist/src/config.js +5 -0
  89. package/dist/src/file-builder.d.ts +91 -0
  90. package/dist/src/file-builder.js +81 -0
  91. package/dist/src/generators/file-generator.d.ts +12 -0
  92. package/dist/src/generators/file-generator.js +7 -0
  93. package/dist/src/generators/models/args.d.ts +233 -0
  94. package/dist/src/generators/models/model-generator.d.ts +25 -0
  95. package/dist/src/generators/models/model-generator.js +14 -0
  96. package/dist/src/generators/models/models-generator.d.ts +15 -0
  97. package/dist/src/generators/models/models-generator.js +15 -0
  98. package/dist/src/generators/models/models.d.ts +93 -2
  99. package/dist/src/generators/models/models.js +5 -0
  100. package/dist/src/generators/services/okhttp3-clients/args.d.ts +138 -0
  101. package/dist/src/generators/services/okhttp3-clients/models.d.ts +83 -0
  102. package/dist/src/generators/services/okhttp3-clients/models.js +5 -0
  103. package/dist/src/generators/services/okhttp3-clients/okhttp3-client-generator.d.ts +33 -0
  104. package/dist/src/generators/services/okhttp3-clients/okhttp3-client-generator.js +20 -0
  105. package/dist/src/generators/services/okhttp3-clients/okhttp3-clients-generator.d.ts +21 -0
  106. package/dist/src/generators/services/okhttp3-clients/okhttp3-clients-generator.js +21 -0
  107. package/dist/src/generators/services/okhttp3-clients/refs.d.ts +25 -0
  108. package/dist/src/generators/services/okhttp3-clients/refs.js +7 -0
  109. package/dist/src/generators/services/spring-controllers/args.d.ts +169 -0
  110. package/dist/src/generators/services/spring-controllers/models.d.ts +120 -0
  111. package/dist/src/generators/services/spring-controllers/models.js +4 -0
  112. package/dist/src/generators/services/spring-controllers/refs.d.ts +9 -0
  113. package/dist/src/generators/services/spring-controllers/refs.js +9 -0
  114. package/dist/src/generators/services/spring-controllers/spring-controller-generator.d.ts +29 -0
  115. package/dist/src/generators/services/spring-controllers/spring-controller-generator.js +19 -0
  116. package/dist/src/generators/services/spring-controllers/spring-controllers-generator.d.ts +22 -0
  117. package/dist/src/generators/services/spring-controllers/spring-controllers-generator.js +22 -0
  118. package/dist/src/generators/services/spring-reactive-web-clients/args.d.ts +224 -0
  119. package/dist/src/generators/services/spring-reactive-web-clients/models.d.ts +86 -0
  120. package/dist/src/generators/services/spring-reactive-web-clients/models.js +4 -0
  121. package/dist/src/generators/services/spring-reactive-web-clients/refs.d.ts +7 -0
  122. package/dist/src/generators/services/spring-reactive-web-clients/refs.js +7 -0
  123. package/dist/src/generators/services/spring-reactive-web-clients/spring-reactive-web-client-generator.d.ts +36 -0
  124. package/dist/src/generators/services/spring-reactive-web-clients/spring-reactive-web-client-generator.js +25 -0
  125. package/dist/src/generators/services/spring-reactive-web-clients/spring-reactive-web-clients-generator.d.ts +20 -0
  126. package/dist/src/generators/services/spring-reactive-web-clients/spring-reactive-web-clients-generator.js +20 -0
  127. package/dist/src/import-collection.d.ts +64 -0
  128. package/dist/src/import-collection.js +46 -0
  129. package/dist/src/types.d.ts +4 -0
  130. package/dist/src/utils.d.ts +52 -0
  131. package/dist/src/utils.js +52 -0
  132. package/package.json +2 -2
@@ -1,26 +1,54 @@
1
+ /**
2
+ * Pre-built references to Kotlin standard library types, functions and annotations.
3
+ *
4
+ * The `kotlin`, `kotlin.collections` and `kotlin.jvm` packages are in the default `globalImports`, so no `import`
5
+ * is emitted for these references unless `globalImports` is changed.
6
+ */
1
7
  import { ktReference } from '../nodes/reference.js';
2
8
  // kotlin
9
+ /** Reference to `Any` from the `kotlin` package. */
3
10
  export const any = ktReference.factory('Any', 'kotlin');
11
+ /** Reference to `Nothing` from the `kotlin` package. */
4
12
  export const nothing = ktReference.factory('Nothing', 'kotlin');
13
+ /** Reference to `Unit` from the `kotlin` package. */
5
14
  export const unit = ktReference.factory('Unit', 'kotlin');
15
+ /** Reference to `String` from the `kotlin` package. */
6
16
  export const string = ktReference.factory('String', 'kotlin');
17
+ /** Reference to `Int` from the `kotlin` package. */
7
18
  export const int = ktReference.factory('Int', 'kotlin');
19
+ /** Reference to `Long` from the `kotlin` package. */
8
20
  export const long = ktReference.factory('Long', 'kotlin');
21
+ /** Reference to `Float` from the `kotlin` package. */
9
22
  export const float = ktReference.factory('Float', 'kotlin');
23
+ /** Reference to `Double` from the `kotlin` package. */
10
24
  export const double = ktReference.factory('Double', 'kotlin');
25
+ /** Reference to `Boolean` from the `kotlin` package. */
11
26
  export const boolean = ktReference.factory('Boolean', 'kotlin');
27
+ /** Reference to the `lazy` function from the `kotlin` package. Takes one type argument. */
12
28
  export const lazyFun = ktReference.genericFactory('lazy', 'kotlin');
29
+ /** Reference to the `Throws` annotation from the `kotlin` package. */
13
30
  export const throws = ktReference.factory('Throws', 'kotlin');
31
+ /** Reference to the `Deprecated` annotation from the `kotlin` package. */
14
32
  export const deprecated = ktReference.factory('Deprecated', 'kotlin');
33
+ /** Reference to `Throwable` from the `kotlin` package. */
15
34
  export const throwable = ktReference.factory('Throwable', 'kotlin');
16
35
  // kotlin.collections
36
+ /** Reference to the `List` type from the `kotlin.collections` package. Takes one type argument. */
17
37
  export const list = ktReference.genericFactory('List', 'kotlin.collections');
38
+ /** Reference to the `MutableList` type from the `kotlin.collections` package. Takes one type argument. */
18
39
  export const mutableList = ktReference.genericFactory('MutableList', 'kotlin.collections');
40
+ /** Reference to the `Map` type from the `kotlin.collections` package. Takes two type arguments. */
19
41
  export const map = ktReference.genericFactory('Map', 'kotlin.collections');
42
+ /** Reference to the `MutableMap` type from the `kotlin.collections` package. Takes two type arguments. */
20
43
  export const mutableMap = ktReference.genericFactory('MutableMap', 'kotlin.collections');
44
+ /** Reference to the `listOf` function from the `kotlin.collections` package. Takes one type argument. */
21
45
  export const listOf = ktReference.genericFactory('listOf', 'kotlin.collections');
46
+ /** Reference to the `mutableListOf` function from the `kotlin.collections` package. Takes one type argument. */
22
47
  export const mutableListOf = ktReference.genericFactory('mutableListOf', 'kotlin.collections');
48
+ /** Reference to the `mapOf` function from the `kotlin.collections` package. Takes two type arguments. */
23
49
  export const mapOf = ktReference.genericFactory('mapOf', 'kotlin.collections');
50
+ /** Reference to the `mutableMapOf` function from the `kotlin.collections` package. Takes two type arguments. */
24
51
  export const mutableMapOf = ktReference.genericFactory('mutableMapOf', 'kotlin.collections');
25
52
  // kotlin.jvm
53
+ /** Reference to the `JvmStatic` annotation from the `kotlin.jvm` package. */
26
54
  export const jvmStatic = ktReference.factory('JvmStatic', 'kotlin.jvm');
@@ -1,4 +1,12 @@
1
+ /**
2
+ * Pre-built references to `kotlinx.coroutines` functions that bridge Reactive Streams and Reactor to coroutines.
3
+ *
4
+ * None of these packages is in the default `globalImports`, so every reference emits an `import`.
5
+ */
1
6
  import { type KtGenericReferenceFactory } from '../nodes/reference.ts';
7
+ /** Reference to `awaitFirst` from the `kotlinx.coroutines.reactive` package. Takes one type argument. */
2
8
  export declare const awaitFirst: KtGenericReferenceFactory<1>;
9
+ /** Reference to `awaitFirstOrNull` from the `kotlinx.coroutines.reactive` package. Takes one type argument. */
3
10
  export declare const awaitFirstOrNull: KtGenericReferenceFactory<1>;
11
+ /** Reference to the `mono` builder from the `kotlinx.coroutines.reactor` package. Takes one type argument. */
4
12
  export declare const mono: KtGenericReferenceFactory<1>;
@@ -1,6 +1,14 @@
1
+ /**
2
+ * Pre-built references to `kotlinx.coroutines` functions that bridge Reactive Streams and Reactor to coroutines.
3
+ *
4
+ * None of these packages is in the default `globalImports`, so every reference emits an `import`.
5
+ */
1
6
  import { ktReference } from '../nodes/reference.js';
2
7
  // kotlinx.coroutines.reactive
8
+ /** Reference to `awaitFirst` from the `kotlinx.coroutines.reactive` package. Takes one type argument. */
3
9
  export const awaitFirst = ktReference.genericFactory('awaitFirst', 'kotlinx.coroutines.reactive');
10
+ /** Reference to `awaitFirstOrNull` from the `kotlinx.coroutines.reactive` package. Takes one type argument. */
4
11
  export const awaitFirstOrNull = ktReference.genericFactory('awaitFirstOrNull', 'kotlinx.coroutines.reactive');
5
12
  // kotlinx.coroutines.reactor
13
+ /** Reference to the `mono` builder from the `kotlinx.coroutines.reactor` package. Takes one type argument. */
6
14
  export const mono = ktReference.genericFactory('mono', 'kotlinx.coroutines.reactor');
@@ -1,3 +1,11 @@
1
+ /**
2
+ * Pre-built references to OkHttp3 types.
3
+ *
4
+ * Each `export const` is a factory that creates a `KtReference` with the given name and package, so the
5
+ * generated code imports the type automatically. See `KtReferenceFactory` for the optional `options`.
6
+ */
1
7
  import { type KtReferenceFactory } from '../nodes/reference.ts';
8
+ /** Reference to `Factory` nested in `okhttp3.Call`, used as the type of generated `client` parameters. */
2
9
  export declare const okHttpClient: KtReferenceFactory;
10
+ /** Reference to `HttpUrl` from the `okhttp3` package. */
3
11
  export declare const httpUrl: KtReferenceFactory;
@@ -1,4 +1,12 @@
1
+ /**
2
+ * Pre-built references to OkHttp3 types.
3
+ *
4
+ * Each `export const` is a factory that creates a `KtReference` with the given name and package, so the
5
+ * generated code imports the type automatically. See `KtReferenceFactory` for the optional `options`.
6
+ */
1
7
  import { ktReference } from '../nodes/reference.js';
2
8
  // okhttp3
9
+ /** Reference to `Factory` nested in `okhttp3.Call`, used as the type of generated `client` parameters. */
3
10
  export const okHttpClient = ktReference.factory('Factory', 'okhttp3.Call');
11
+ /** Reference to `HttpUrl` from the `okhttp3` package. */
4
12
  export const httpUrl = ktReference.factory('HttpUrl', 'okhttp3');
@@ -1,3 +1,11 @@
1
+ /**
2
+ * Pre-built references to Project Reactor publisher types.
3
+ *
4
+ * Each `export const` is a generic factory that creates a `KtReference` with the given name and package, so the
5
+ * generated code imports the type automatically. See `KtGenericReferenceFactory` for the type-argument tuple.
6
+ */
1
7
  import { type KtGenericReferenceFactory } from '../nodes/reference.ts';
8
+ /** Generic reference to `Flux` from the `reactor.core.publisher` package, taking one type argument. */
2
9
  export declare const flux: KtGenericReferenceFactory<1>;
10
+ /** Generic reference to `Mono` from the `reactor.core.publisher` package, taking one type argument. */
3
11
  export declare const mono: KtGenericReferenceFactory<1>;
@@ -1,4 +1,12 @@
1
+ /**
2
+ * Pre-built references to Project Reactor publisher types.
3
+ *
4
+ * Each `export const` is a generic factory that creates a `KtReference` with the given name and package, so the
5
+ * generated code imports the type automatically. See `KtGenericReferenceFactory` for the type-argument tuple.
6
+ */
1
7
  import { ktReference } from '../nodes/reference.js';
2
8
  // reactor.core.publisher
9
+ /** Generic reference to `Flux` from the `reactor.core.publisher` package, taking one type argument. */
3
10
  export const flux = ktReference.genericFactory('Flux', 'reactor.core.publisher');
11
+ /** Generic reference to `Mono` from the `reactor.core.publisher` package, taking one type argument. */
4
12
  export const mono = ktReference.genericFactory('Mono', 'reactor.core.publisher');
@@ -1,9 +1,27 @@
1
+ /**
2
+ * Pre-built references to Spring WebFlux `WebClient` types and the Kotlin extension functions used with them.
3
+ *
4
+ * Each `export const` is a factory that creates a `KtReference` with the given name and package, so the
5
+ * generated code imports the type automatically. See `KtReferenceFactory` for the optional `options`, and
6
+ * `KtGenericReferenceFactory` for the type-argument tuple that generic factories take first.
7
+ */
1
8
  import { type KtGenericReferenceFactory, type KtReferenceFactory } from '../nodes/reference.ts';
9
+ /** Reference to `BodyInserters` from the `org.springframework.web.reactive.function` package. */
2
10
  export declare const bodyInserters: KtReferenceFactory;
11
+ /** Reference to `WebClient` from the `org.springframework.web.reactive.function.client` package. */
3
12
  export declare const webClient: KtReferenceFactory;
13
+ /** Reference to `ClientResponse` from the `org.springframework.web.reactive.function.client` package. */
4
14
  export declare const clientResponse: KtReferenceFactory;
15
+ /**
16
+ * Generic reference to `RequestHeadersSpec` from the `org.springframework.web.reactive.function.client.WebClient`
17
+ * package, a type nested in `WebClient`, taking one type argument.
18
+ */
5
19
  export declare const requestHeadersSpec: KtGenericReferenceFactory<1>;
20
+ /** Generic reference to `toEntity` from the `org.springframework.web.reactive.function.client` package. */
6
21
  export declare const toEntity: KtGenericReferenceFactory<1>;
22
+ /** Generic reference to `awaitBody` from the `org.springframework.web.reactive.function.client` package. */
7
23
  export declare const awaitBody: KtGenericReferenceFactory<1>;
24
+ /** Reference to `awaitBodilessEntity` from the `org.springframework.web.reactive.function.client` package. */
8
25
  export declare const awaitBodilessEntity: KtReferenceFactory;
26
+ /** Reference to `awaitExchange` from the `org.springframework.web.reactive.function.client` package. */
9
27
  export declare const awaitExchange: KtReferenceFactory;
@@ -1,11 +1,29 @@
1
+ /**
2
+ * Pre-built references to Spring WebFlux `WebClient` types and the Kotlin extension functions used with them.
3
+ *
4
+ * Each `export const` is a factory that creates a `KtReference` with the given name and package, so the
5
+ * generated code imports the type automatically. See `KtReferenceFactory` for the optional `options`, and
6
+ * `KtGenericReferenceFactory` for the type-argument tuple that generic factories take first.
7
+ */
1
8
  import { ktReference } from '../nodes/reference.js';
2
9
  // org.springframework.web.reactive.function
10
+ /** Reference to `BodyInserters` from the `org.springframework.web.reactive.function` package. */
3
11
  export const bodyInserters = ktReference.factory('BodyInserters', 'org.springframework.web.reactive.function');
4
12
  // org.springframework.web.reactive.function.client
13
+ /** Reference to `WebClient` from the `org.springframework.web.reactive.function.client` package. */
5
14
  export const webClient = ktReference.factory('WebClient', 'org.springframework.web.reactive.function.client');
15
+ /** Reference to `ClientResponse` from the `org.springframework.web.reactive.function.client` package. */
6
16
  export const clientResponse = ktReference.factory('ClientResponse', 'org.springframework.web.reactive.function.client');
17
+ /**
18
+ * Generic reference to `RequestHeadersSpec` from the `org.springframework.web.reactive.function.client.WebClient`
19
+ * package, a type nested in `WebClient`, taking one type argument.
20
+ */
7
21
  export const requestHeadersSpec = ktReference.genericFactory('RequestHeadersSpec', 'org.springframework.web.reactive.function.client.WebClient');
22
+ /** Generic reference to `toEntity` from the `org.springframework.web.reactive.function.client` package. */
8
23
  export const toEntity = ktReference.genericFactory('toEntity', 'org.springframework.web.reactive.function.client');
24
+ /** Generic reference to `awaitBody` from the `org.springframework.web.reactive.function.client` package. */
9
25
  export const awaitBody = ktReference.genericFactory('awaitBody', 'org.springframework.web.reactive.function.client');
26
+ /** Reference to `awaitBodilessEntity` from the `org.springframework.web.reactive.function.client` package. */
10
27
  export const awaitBodilessEntity = ktReference.factory('awaitBodilessEntity', 'org.springframework.web.reactive.function.client');
28
+ /** Reference to `awaitExchange` from the `org.springframework.web.reactive.function.client` package. */
11
29
  export const awaitExchange = ktReference.factory('awaitExchange', 'org.springframework.web.reactive.function.client');
@@ -1,21 +1,48 @@
1
+ /**
2
+ * Pre-built references to well-known Spring Framework types.
3
+ *
4
+ * Each `export const` is a factory that creates a `KtReference` with the given name and package, so the
5
+ * generated code imports the type automatically. See `KtReferenceFactory` for the optional `options`, and
6
+ * `KtGenericReferenceFactory` for the type-argument tuple that generic factories take first.
7
+ */
1
8
  import { type KtGenericReferenceFactory, type KtReferenceFactory } from '../nodes/reference.ts';
9
+ /** Reference to `Autowired` from the `org.springframework.beans.factory.annotation` package. */
2
10
  export declare const autowired: KtReferenceFactory;
11
+ /** Reference to `HttpStatus` from the `org.springframework.http` package. */
3
12
  export declare const httpStatus: KtReferenceFactory;
13
+ /** Reference to `HttpMethod` from the `org.springframework.http` package. */
4
14
  export declare const httpMethod: KtReferenceFactory;
15
+ /** Generic reference to `ResponseEntity` from the `org.springframework.http` package, taking one type argument. */
5
16
  export declare const responseEntity: KtGenericReferenceFactory<1>;
17
+ /** Reference to `MediaType` from the `org.springframework.http` package. */
6
18
  export declare const mediaType: KtReferenceFactory;
19
+ /** Reference to `MultipartBodyBuilder` from the `org.springframework.http.client` package. */
7
20
  export declare const multipartBodyBuilder: KtReferenceFactory;
21
+ /** Reference to `FilePart` from the `org.springframework.http.codec.multipart` package. */
8
22
  export declare const filePart: KtReferenceFactory;
23
+ /** Reference to `Controller` from the `org.springframework.stereotype` package. */
9
24
  export declare const controller: KtReferenceFactory;
25
+ /** Generic reference to `MultiValueMap` from the `org.springframework.util` package, taking two type arguments. */
10
26
  export declare const multiValueMap: KtGenericReferenceFactory<2>;
27
+ /** Generic reference to `LinkedMultiValueMap` from `org.springframework.util`, taking two type arguments. */
11
28
  export declare const linkedMultiValueMap: KtGenericReferenceFactory<2>;
29
+ /** Reference to `Validated` from the `org.springframework.validation.annotation` package. */
12
30
  export declare const validated: KtReferenceFactory;
31
+ /** Reference to `PathVariable` from the `org.springframework.web.bind.annotation` package. */
13
32
  export declare const pathVariable: KtReferenceFactory;
33
+ /** Reference to `RequestBody` from the `org.springframework.web.bind.annotation` package. */
14
34
  export declare const requestBody: KtReferenceFactory;
35
+ /** Reference to `RequestMapping` from the `org.springframework.web.bind.annotation` package. */
15
36
  export declare const requestMapping: KtReferenceFactory;
37
+ /** Reference to `RequestMethod` from the `org.springframework.web.bind.annotation` package. */
16
38
  export declare const requestMethod: KtReferenceFactory;
39
+ /** Reference to `RequestParam` from the `org.springframework.web.bind.annotation` package. */
17
40
  export declare const requestParam: KtReferenceFactory;
41
+ /** Reference to `RequestPart` from the `org.springframework.web.bind.annotation` package. */
18
42
  export declare const requestPart: KtReferenceFactory;
43
+ /** Reference to `RequestHeader` from the `org.springframework.web.bind.annotation` package. */
19
44
  export declare const requestHeader: KtReferenceFactory;
45
+ /** Reference to `NativeWebRequest` from the `org.springframework.web.context.request` package. */
20
46
  export declare const nativeWebRequest: KtReferenceFactory;
47
+ /** Reference to `UriComponentsBuilder` from the `org.springframework.web.util` package. */
21
48
  export declare const uriComponentsBuilder: KtReferenceFactory;
@@ -1,31 +1,58 @@
1
+ /**
2
+ * Pre-built references to well-known Spring Framework types.
3
+ *
4
+ * Each `export const` is a factory that creates a `KtReference` with the given name and package, so the
5
+ * generated code imports the type automatically. See `KtReferenceFactory` for the optional `options`, and
6
+ * `KtGenericReferenceFactory` for the type-argument tuple that generic factories take first.
7
+ */
1
8
  import { ktReference } from '../nodes/reference.js';
2
9
  // org.springframework.beans.factory.annotation
10
+ /** Reference to `Autowired` from the `org.springframework.beans.factory.annotation` package. */
3
11
  export const autowired = ktReference.factory('Autowired', 'org.springframework.beans.factory.annotation');
4
12
  // org.springframework.http
13
+ /** Reference to `HttpStatus` from the `org.springframework.http` package. */
5
14
  export const httpStatus = ktReference.factory('HttpStatus', 'org.springframework.http');
15
+ /** Reference to `HttpMethod` from the `org.springframework.http` package. */
6
16
  export const httpMethod = ktReference.factory('HttpMethod', 'org.springframework.http');
17
+ /** Generic reference to `ResponseEntity` from the `org.springframework.http` package, taking one type argument. */
7
18
  export const responseEntity = ktReference.genericFactory('ResponseEntity', 'org.springframework.http');
19
+ /** Reference to `MediaType` from the `org.springframework.http` package. */
8
20
  export const mediaType = ktReference.factory('MediaType', 'org.springframework.http');
9
21
  // org.springframework.http.client
22
+ /** Reference to `MultipartBodyBuilder` from the `org.springframework.http.client` package. */
10
23
  export const multipartBodyBuilder = ktReference.factory('MultipartBodyBuilder', 'org.springframework.http.client');
11
24
  // org.springframework.http.codec.multipart
25
+ /** Reference to `FilePart` from the `org.springframework.http.codec.multipart` package. */
12
26
  export const filePart = ktReference.factory('FilePart', 'org.springframework.http.codec.multipart');
13
27
  // org.springframework.stereotype
28
+ /** Reference to `Controller` from the `org.springframework.stereotype` package. */
14
29
  export const controller = ktReference.factory('Controller', 'org.springframework.stereotype');
15
30
  // org.springframework.util
31
+ /** Generic reference to `MultiValueMap` from the `org.springframework.util` package, taking two type arguments. */
16
32
  export const multiValueMap = ktReference.genericFactory('MultiValueMap', 'org.springframework.util');
33
+ /** Generic reference to `LinkedMultiValueMap` from `org.springframework.util`, taking two type arguments. */
17
34
  export const linkedMultiValueMap = ktReference.genericFactory('LinkedMultiValueMap', 'org.springframework.util');
18
35
  // org.springframework.validation.annotation
36
+ /** Reference to `Validated` from the `org.springframework.validation.annotation` package. */
19
37
  export const validated = ktReference.factory('Validated', 'org.springframework.validation.annotation');
20
38
  // org.springframework.web.bind.annotation
39
+ /** Reference to `PathVariable` from the `org.springframework.web.bind.annotation` package. */
21
40
  export const pathVariable = ktReference.factory('PathVariable', 'org.springframework.web.bind.annotation');
41
+ /** Reference to `RequestBody` from the `org.springframework.web.bind.annotation` package. */
22
42
  export const requestBody = ktReference.factory('RequestBody', 'org.springframework.web.bind.annotation');
43
+ /** Reference to `RequestMapping` from the `org.springframework.web.bind.annotation` package. */
23
44
  export const requestMapping = ktReference.factory('RequestMapping', 'org.springframework.web.bind.annotation');
45
+ /** Reference to `RequestMethod` from the `org.springframework.web.bind.annotation` package. */
24
46
  export const requestMethod = ktReference.factory('RequestMethod', 'org.springframework.web.bind.annotation');
47
+ /** Reference to `RequestParam` from the `org.springframework.web.bind.annotation` package. */
25
48
  export const requestParam = ktReference.factory('RequestParam', 'org.springframework.web.bind.annotation');
49
+ /** Reference to `RequestPart` from the `org.springframework.web.bind.annotation` package. */
26
50
  export const requestPart = ktReference.factory('RequestPart', 'org.springframework.web.bind.annotation');
51
+ /** Reference to `RequestHeader` from the `org.springframework.web.bind.annotation` package. */
27
52
  export const requestHeader = ktReference.factory('RequestHeader', 'org.springframework.web.bind.annotation');
28
53
  // org.springframework.web.context.request
54
+ /** Reference to `NativeWebRequest` from the `org.springframework.web.context.request` package. */
29
55
  export const nativeWebRequest = ktReference.factory('NativeWebRequest', 'org.springframework.web.context.request');
30
56
  // org.springframework.web.util
57
+ /** Reference to `UriComponentsBuilder` from the `org.springframework.web.util` package. */
31
58
  export const uriComponentsBuilder = ktReference.factory('UriComponentsBuilder', 'org.springframework.web.util');
@@ -1,8 +1,21 @@
1
+ /**
2
+ * Pre-built references to Swagger/OpenAPI annotation types from the `io.swagger.v3.oas.annotations` packages.
3
+ *
4
+ * Each `export const` is a factory that creates a `KtReference` with the given name and package, so the
5
+ * generated code imports the type automatically. See `KtReferenceFactory` for the optional `options`.
6
+ */
1
7
  import { type KtReferenceFactory } from '../nodes/reference.ts';
8
+ /** Reference to `Parameter` from the `io.swagger.v3.oas.annotations` package. */
2
9
  export declare const parameter: KtReferenceFactory;
10
+ /** Reference to `Operation` from the `io.swagger.v3.oas.annotations` package. */
3
11
  export declare const operation: KtReferenceFactory;
12
+ /** Reference to `Schema` from the `io.swagger.v3.oas.annotations.media` package. */
4
13
  export declare const schema: KtReferenceFactory;
14
+ /** Reference to `ArraySchema` from the `io.swagger.v3.oas.annotations.media` package. */
5
15
  export declare const arraySchema: KtReferenceFactory;
16
+ /** Reference to `Content` from the `io.swagger.v3.oas.annotations.media` package. */
6
17
  export declare const content: KtReferenceFactory;
18
+ /** Reference to `ApiResponse` from the `io.swagger.v3.oas.annotations.responses` package. */
7
19
  export declare const apiResponse: KtReferenceFactory;
20
+ /** Reference to `ApiResponses` from the `io.swagger.v3.oas.annotations.responses` package. */
8
21
  export declare const apiResponses: KtReferenceFactory;
@@ -1,11 +1,24 @@
1
+ /**
2
+ * Pre-built references to Swagger/OpenAPI annotation types from the `io.swagger.v3.oas.annotations` packages.
3
+ *
4
+ * Each `export const` is a factory that creates a `KtReference` with the given name and package, so the
5
+ * generated code imports the type automatically. See `KtReferenceFactory` for the optional `options`.
6
+ */
1
7
  import { ktReference } from '../nodes/reference.js';
2
8
  // io.swagger.v3.oas.annotations
9
+ /** Reference to `Parameter` from the `io.swagger.v3.oas.annotations` package. */
3
10
  export const parameter = ktReference.factory('Parameter', 'io.swagger.v3.oas.annotations');
11
+ /** Reference to `Operation` from the `io.swagger.v3.oas.annotations` package. */
4
12
  export const operation = ktReference.factory('Operation', 'io.swagger.v3.oas.annotations');
5
13
  // io.swagger.v3.oas.annotations.media
14
+ /** Reference to `Schema` from the `io.swagger.v3.oas.annotations.media` package. */
6
15
  export const schema = ktReference.factory('Schema', 'io.swagger.v3.oas.annotations.media');
16
+ /** Reference to `ArraySchema` from the `io.swagger.v3.oas.annotations.media` package. */
7
17
  export const arraySchema = ktReference.factory('ArraySchema', 'io.swagger.v3.oas.annotations.media');
18
+ /** Reference to `Content` from the `io.swagger.v3.oas.annotations.media` package. */
8
19
  export const content = ktReference.factory('Content', 'io.swagger.v3.oas.annotations.media');
9
20
  // io.swagger.v3.oas.annotations.responses
21
+ /** Reference to `ApiResponse` from the `io.swagger.v3.oas.annotations.responses` package. */
10
22
  export const apiResponse = ktReference.factory('ApiResponse', 'io.swagger.v3.oas.annotations.responses');
23
+ /** Reference to `ApiResponses` from the `io.swagger.v3.oas.annotations.responses` package. */
11
24
  export const apiResponses = ktReference.factory('ApiResponses', 'io.swagger.v3.oas.annotations.responses');
@@ -1,3 +1,13 @@
1
1
  import { type SourceBuilder } from '@goast/core';
2
2
  import { type KotlinGeneratorConfig } from '../../config.ts';
3
+ /**
4
+ * Gets the Kotlin generator configuration that applies to a builder.
5
+ *
6
+ * A `KotlinFileBuilder` returns its own options. For any other builder, the OpenAPI defaults are overridden by the
7
+ * Kotlin defaults, which are overridden by the builder's own options. The merged result is also assigned to the
8
+ * builder under a private symbol key.
9
+ *
10
+ * @param builder The builder to get the configuration for.
11
+ * @returns The Kotlin generator configuration for the builder.
12
+ */
3
13
  export declare function getKotlinBuilderOptions(builder: SourceBuilder): KotlinGeneratorConfig;
@@ -2,6 +2,16 @@ import { defaultOpenApiGeneratorConfig } from '@goast/core';
2
2
  import { defaultKotlinGeneratorConfig } from '../../config.js';
3
3
  import { KotlinFileBuilder } from '../../file-builder.js';
4
4
  const ktConfigSymbol = Symbol();
5
+ /**
6
+ * Gets the Kotlin generator configuration that applies to a builder.
7
+ *
8
+ * A `KotlinFileBuilder` returns its own options. For any other builder, the OpenAPI defaults are overridden by the
9
+ * Kotlin defaults, which are overridden by the builder's own options. The merged result is also assigned to the
10
+ * builder under a private symbol key.
11
+ *
12
+ * @param builder The builder to get the configuration for.
13
+ * @returns The Kotlin generator configuration for the builder.
14
+ */
5
15
  export function getKotlinBuilderOptions(builder) {
6
16
  if (builder instanceof KotlinFileBuilder) {
7
17
  return builder.options;
@@ -1,7 +1,47 @@
1
1
  import type { BasicAppendValue, SourceBuilder } from '@goast/core';
2
2
  import { type KtCall } from '../nodes/call.ts';
3
3
  import { type KtString } from '../nodes/string.ts';
4
+ /**
5
+ * Converts a plain object into a Kotlin `mapOf(...)` call, with one `"key".to(value)` entry per property.
6
+ *
7
+ * Each property value is converted with the same rules, recursively. The entries are the arguments of the call, so
8
+ * they are written inline with `, ` between them, or one per line separated by `,` when there are more than three.
9
+ * No blank lines are written.
10
+ *
11
+ * @template TBuilder The type of the source builder the call is written to.
12
+ * @param object The object whose own enumerable properties become the map entries.
13
+ * @returns A Kotlin call node for `mapOf`.
14
+ */
4
15
  export declare function toKtNode<TBuilder extends SourceBuilder>(object: Record<string | number, unknown>): KtCall<TBuilder>;
16
+ /**
17
+ * Converts an array into a Kotlin `listOf(...)` call, with each element converted recursively.
18
+ *
19
+ * The elements are the arguments of the call, so they are written inline, separated by `, `, or one per line separated
20
+ * by `,` when there are more than three. No blank lines are written.
21
+ *
22
+ * @template TBuilder The type of the source builder the call is written to.
23
+ * @param list The array whose elements become the list entries.
24
+ * @returns A Kotlin call node for `listOf`.
25
+ */
5
26
  export declare function toKtNode<TBuilder extends SourceBuilder>(list: unknown[]): KtCall<TBuilder>;
27
+ /**
28
+ * Converts a string into a Kotlin string literal node.
29
+ *
30
+ * @template TBuilder The type of the source builder the literal is written to.
31
+ * @param string The string to convert.
32
+ * @returns A Kotlin string literal node.
33
+ */
6
34
  export declare function toKtNode<TBuilder extends SourceBuilder>(string: string): KtString<TBuilder>;
35
+ /**
36
+ * Converts any value into a Kotlin node or a plain append value.
37
+ *
38
+ * `null` and `undefined` become the text `null`. Booleans and numbers are written with `String(value)`. Arrays and
39
+ * objects are converted to `listOf` and `mapOf` calls, as described for the other overloads. All remaining values are
40
+ * converted to a string literal of their `String` representation.
41
+ *
42
+ * @template TBuilder The type of the source builder the value is written to.
43
+ * @param value The value to convert.
44
+ * @returns A Kotlin call or string node for arrays, objects and other values, or the text of `null`, booleans and
45
+ * numbers.
46
+ */
7
47
  export declare function toKtNode<TBuilder extends SourceBuilder>(value: unknown): BasicAppendValue<TBuilder>;
@@ -1,5 +1,18 @@
1
1
  import { type Nullable, type SingleOrMultiple, type SourceBuilder } from '@goast/core';
2
2
  import { type KtAppendValue } from './write-kt-node.ts';
3
+ /**
4
+ * Writes a list of annotations, each followed by a separator.
5
+ *
6
+ * Each annotation, including the last one, is followed by a line break when `options.multiline` is set, or by a single
7
+ * space otherwise. Nothing is written before the first annotation, and no blank lines are added. Content written after
8
+ * the annotations therefore starts after that trailing separator.
9
+ *
10
+ * @template TBuilder The type of the source builder the annotations are written to.
11
+ * @param builder The builder to write to.
12
+ * @param nodes The annotations, as a single node or an array. Nullish entries are ignored.
13
+ * @param options Options for writing. When `multiline` is `true`, each annotation is followed by a line break instead
14
+ * of a space.
15
+ */
3
16
  export declare function writeKtAnnotations<TBuilder extends SourceBuilder>(builder: TBuilder, nodes: SingleOrMultiple<Nullable<KtAppendValue<TBuilder>>>, options?: {
4
17
  multiline: boolean;
5
18
  }): void;
@@ -1,5 +1,18 @@
1
1
  import { notNullish, toArray } from '@goast/core';
2
2
  import { writeKtNode } from './write-kt-node.js';
3
+ /**
4
+ * Writes a list of annotations, each followed by a separator.
5
+ *
6
+ * Each annotation, including the last one, is followed by a line break when `options.multiline` is set, or by a single
7
+ * space otherwise. Nothing is written before the first annotation, and no blank lines are added. Content written after
8
+ * the annotations therefore starts after that trailing separator.
9
+ *
10
+ * @template TBuilder The type of the source builder the annotations are written to.
11
+ * @param builder The builder to write to.
12
+ * @param nodes The annotations, as a single node or an array. Nullish entries are ignored.
13
+ * @param options Options for writing. When `multiline` is `true`, each annotation is followed by a line break instead
14
+ * of a space.
15
+ */
3
16
  export function writeKtAnnotations(builder, nodes, options) {
4
17
  const filteredNodes = toArray(nodes).filter(notNullish);
5
18
  builder.forEach(filteredNodes, (b, a) => {
@@ -1,3 +1,18 @@
1
1
  import { type Nullable, type SingleOrMultiple, type SourceBuilder } from '@goast/core';
2
2
  import { type KtAppendValue } from './write-kt-node.ts';
3
+ /**
4
+ * Writes a call's argument list, moving a trailing lambda after the closing parenthesis.
5
+ *
6
+ * - No arguments write `()`.
7
+ * - A trailing `KtLambda`, passed directly or as the value of an unnamed argument, is removed from the arguments and
8
+ * written after them with a leading space, such as `foo(a) { ... }`.
9
+ * - If the lambda is the only argument, the parentheses are omitted, such as `foo { ... }`.
10
+ * - Arguments are written inline, separated by `, `. With more than three arguments, the parentheses go on their own
11
+ * lines and each argument is written on its own line, separated by `,` and a line break.
12
+ * - No blank lines and no trailing comma are written.
13
+ *
14
+ * @template TBuilder The type of the source builder the arguments are written to.
15
+ * @param builder The builder to write to.
16
+ * @param nodes The arguments, as a single node or an array. Nullish entries are ignored.
17
+ */
3
18
  export declare function writeKtArguments<TBuilder extends SourceBuilder>(builder: TBuilder, nodes: SingleOrMultiple<Nullable<KtAppendValue<TBuilder>>>): void;
@@ -1,6 +1,21 @@
1
1
  import { notNullish, toArray } from '@goast/core';
2
2
  import { KtLambda } from '../nodes/lambda.js';
3
3
  import { writeKtNode, writeKtNodes } from './write-kt-node.js';
4
+ /**
5
+ * Writes a call's argument list, moving a trailing lambda after the closing parenthesis.
6
+ *
7
+ * - No arguments write `()`.
8
+ * - A trailing `KtLambda`, passed directly or as the value of an unnamed argument, is removed from the arguments and
9
+ * written after them with a leading space, such as `foo(a) { ... }`.
10
+ * - If the lambda is the only argument, the parentheses are omitted, such as `foo { ... }`.
11
+ * - Arguments are written inline, separated by `, `. With more than three arguments, the parentheses go on their own
12
+ * lines and each argument is written on its own line, separated by `,` and a line break.
13
+ * - No blank lines and no trailing comma are written.
14
+ *
15
+ * @template TBuilder The type of the source builder the arguments are written to.
16
+ * @param builder The builder to write to.
17
+ * @param nodes The arguments, as a single node or an array. Nullish entries are ignored.
18
+ */
4
19
  export function writeKtArguments(builder, nodes) {
5
20
  const filteredNodes = toArray(nodes).filter(notNullish);
6
21
  if (filteredNodes.length === 0) {
@@ -1,3 +1,16 @@
1
1
  import { type Nullable, type SingleOrMultiple, type SourceBuilder } from '@goast/core';
2
2
  import { type KtAppendValue } from './write-kt-node.ts';
3
+ /**
4
+ * Writes the entries of a Kotlin enum class, separated by commas.
5
+ *
6
+ * The entries are written inline, separated by `, `, unless the list is multiline. The list is multiline when any entry
7
+ * has annotations, a doc comment or members, when there are more than four entries, or when any entry has arguments.
8
+ * A multiline list writes each entry on its own line, separated by `,` and a line break. When any entry has
9
+ * annotations, a doc comment or members, a blank line is also written before every entry except the first. No trailing
10
+ * comma or semicolon is written, so the caller adds the terminator.
11
+ *
12
+ * @template TBuilder The type of the source builder the entries are written to.
13
+ * @param builder The builder to write to.
14
+ * @param nodes The enum entries, as a single node or an array. Nullish entries are ignored.
15
+ */
3
16
  export declare function writeKtEnumValues<TBuilder extends SourceBuilder>(builder: TBuilder, nodes: SingleOrMultiple<Nullable<KtAppendValue<TBuilder>>>): void;
@@ -1,5 +1,18 @@
1
1
  import { notNullish, toArray } from '@goast/core';
2
2
  import { writeKtNode } from './write-kt-node.js';
3
+ /**
4
+ * Writes the entries of a Kotlin enum class, separated by commas.
5
+ *
6
+ * The entries are written inline, separated by `, `, unless the list is multiline. The list is multiline when any entry
7
+ * has annotations, a doc comment or members, when there are more than four entries, or when any entry has arguments.
8
+ * A multiline list writes each entry on its own line, separated by `,` and a line break. When any entry has
9
+ * annotations, a doc comment or members, a blank line is also written before every entry except the first. No trailing
10
+ * comma or semicolon is written, so the caller adds the terminator.
11
+ *
12
+ * @template TBuilder The type of the source builder the entries are written to.
13
+ * @param builder The builder to write to.
14
+ * @param nodes The enum entries, as a single node or an array. Nullish entries are ignored.
15
+ */
3
16
  export function writeKtEnumValues(builder, nodes) {
4
17
  const filteredNodes = toArray(nodes).filter(notNullish);
5
18
  const spacing = filteredNodes.some((v) => typeof v === 'object' &&
@@ -1,3 +1,13 @@
1
1
  import { type Nullable, type SingleOrMultiple, type SourceBuilder } from '@goast/core';
2
2
  import { type KtAppendValue } from './write-kt-node.ts';
3
+ /**
4
+ * Writes a list of generic parameters or type arguments in angle brackets, such as `<T, U>`.
5
+ *
6
+ * Nothing is written when there are no entries. Otherwise the entries are always written on one line, separated by
7
+ * `, `.
8
+ *
9
+ * @template TBuilder The type of the source builder the entries are written to.
10
+ * @param builder The builder to write to.
11
+ * @param nodes The type parameters or type arguments, as a single node or an array. Nullish entries are ignored.
12
+ */
3
13
  export declare function writeKtGenericParameters<TBuilder extends SourceBuilder>(builder: TBuilder, nodes: SingleOrMultiple<Nullable<KtAppendValue<TBuilder>>>): void;
@@ -1,5 +1,15 @@
1
1
  import { notNullish, toArray } from '@goast/core';
2
2
  import { writeKtNode } from './write-kt-node.js';
3
+ /**
4
+ * Writes a list of generic parameters or type arguments in angle brackets, such as `<T, U>`.
5
+ *
6
+ * Nothing is written when there are no entries. Otherwise the entries are always written on one line, separated by
7
+ * `, `.
8
+ *
9
+ * @template TBuilder The type of the source builder the entries are written to.
10
+ * @param builder The builder to write to.
11
+ * @param nodes The type parameters or type arguments, as a single node or an array. Nullish entries are ignored.
12
+ */
3
13
  export function writeKtGenericParameters(builder, nodes) {
4
14
  const filteredNodes = toArray(nodes).filter(notNullish);
5
15
  if (filteredNodes.length === 0)
@@ -1,5 +1,21 @@
1
1
  import { type Nullable, type SourceBuilder } from '@goast/core';
2
2
  import { type KtAppendValue } from './write-kt-node.ts';
3
+ /**
4
+ * Writes class members, separating them with blank lines where needed.
5
+ *
6
+ * Each member is either compact or a block. A compact member is a `KtProperty` without a doc comment and without
7
+ * annotations, or a plain append value such as a string. All other members are blocks. The rules are:
8
+ * - A block member is preceded by a blank line, except when it is the first member and `alreadyHasMembers` is not set.
9
+ * - A block member is followed by a blank line, except when it is the last member.
10
+ * - A compact member is written on its own line and followed by a line break. No blank line is added before or after
11
+ * it, so consecutive compact members are written on consecutive lines.
12
+ *
13
+ * @template TBuilder The type of the source builder the members are written to.
14
+ * @param builder The builder to write to.
15
+ * @param members The members in the order they are written. Nullish entries are ignored.
16
+ * @param options Options for writing. Set `alreadyHasMembers` when other members precede these, so that a first block
17
+ * member also gets a blank line before it.
18
+ */
3
19
  export declare function writeKtMembers<TBuilder extends SourceBuilder>(builder: TBuilder, members: Nullable<KtAppendValue<TBuilder>>[], options?: {
4
20
  alreadyHasMembers?: boolean;
5
21
  }): void;