@optique/core 1.2.0-dev.2240 → 1.2.0-dev.2241

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.
@@ -101,9 +101,20 @@ interface ValueParser<M extends Mode = "sync", T = unknown> {
101
101
  * Provides completion suggestions for values of this type.
102
102
  * This is optional and used for shell completion functionality.
103
103
  *
104
- * @param prefix The current input prefix to complete.
105
- * @returns An iterable of suggestion objects.
106
- * In async mode, returns an AsyncIterable.
104
+ * In `"sync"` mode, returns an `Iterable<Suggestion>`. In `"async"`
105
+ * mode, returns an `AsyncIterable<Suggestion>`; the runtime consumes
106
+ * it with `for await`. Sleeping or yielding in multiple batches is
107
+ * acceptable.
108
+ *
109
+ * For async suggesters, failures must be swallowed and logged rather
110
+ * than propagated as exceptions, because completion is best-effort.
111
+ * An exception that escapes the generator will surface as broken
112
+ * completion in the user's shell.
113
+ *
114
+ * @param prefix The current input prefix to complete. Only yield
115
+ * items whose `text` starts with this prefix.
116
+ * @returns An iterable (or async iterable in async mode) of
117
+ * suggestion objects.
107
118
  * @since 0.6.0
108
119
  */
109
120
  suggest?(prefix: string): ModeIterable<M, Suggestion>;
@@ -101,9 +101,20 @@ interface ValueParser<M extends Mode = "sync", T = unknown> {
101
101
  * Provides completion suggestions for values of this type.
102
102
  * This is optional and used for shell completion functionality.
103
103
  *
104
- * @param prefix The current input prefix to complete.
105
- * @returns An iterable of suggestion objects.
106
- * In async mode, returns an AsyncIterable.
104
+ * In `"sync"` mode, returns an `Iterable<Suggestion>`. In `"async"`
105
+ * mode, returns an `AsyncIterable<Suggestion>`; the runtime consumes
106
+ * it with `for await`. Sleeping or yielding in multiple batches is
107
+ * acceptable.
108
+ *
109
+ * For async suggesters, failures must be swallowed and logged rather
110
+ * than propagated as exceptions, because completion is best-effort.
111
+ * An exception that escapes the generator will surface as broken
112
+ * completion in the user's shell.
113
+ *
114
+ * @param prefix The current input prefix to complete. Only yield
115
+ * items whose `text` starts with this prefix.
116
+ * @returns An iterable (or async iterable in async mode) of
117
+ * suggestion objects.
107
118
  * @since 0.6.0
108
119
  */
109
120
  suggest?(prefix: string): ModeIterable<M, Suggestion>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@optique/core",
3
- "version": "1.2.0-dev.2240",
3
+ "version": "1.2.0-dev.2241",
4
4
  "description": "Type-safe combinatorial command-line interface parser",
5
5
  "keywords": [
6
6
  "CLI",
@@ -208,7 +208,7 @@
208
208
  "fast-check": "^4.7.0",
209
209
  "tsdown": "^0.13.0",
210
210
  "typescript": "^5.8.3",
211
- "@optique/env": "1.2.0-dev.2240+70c4e017"
211
+ "@optique/env": "1.2.0-dev.2241+d223bc07"
212
212
  },
213
213
  "scripts": {
214
214
  "build": "tsdown",