File tree 3 files changed +7
-5
lines changed
3 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,8 @@ Breaking changes:
9
9
New features:
10
10
11
11
Bugfixes:
12
+ - Ensure that callbacks passed to ` question ` and ` question' ` are invoked
13
+ - Fixed typo in options passed to ` readline.createInterface `
12
14
13
15
Other improvements:
14
16
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ export const createInterfaceImpl = (options) => readline.createInterface({
14
14
historySize : options . historySize ,
15
15
removeHistoryDuplicates : options . removeHistoryDuplicates ,
16
16
prompt : options . prompt ,
17
- crlDelay : options . crlDelay ,
17
+ crlfDelay : options . crlfDelay ,
18
18
escapeCodeTimeout : options . escapeCodeTimeout ,
19
19
tabSize : options . tabSize ,
20
20
signal : options . signal
Original file line number Diff line number Diff line change @@ -316,9 +316,9 @@ foreign import promptOptsImpl :: EffectFn2 (Boolean) (Interface) (Unit)
316
316
-- |
317
317
-- | The callback function passed to `rl.question()` does not follow the typical pattern of accepting an Error object or null as the first argument. The callback is called with the provided answer as the only argument.
318
318
question :: String -> (String -> Effect Unit ) -> Interface -> Effect Unit
319
- question text cb iface = runEffectFn3 questionImpl iface text cb
319
+ question text cb iface = runEffectFn3 questionImpl iface text $ mkEffectFn1 cb
320
320
321
- foreign import questionImpl :: EffectFn3 (Interface ) (String ) (( String -> Effect Unit ) ) Unit
321
+ foreign import questionImpl :: EffectFn3 (Interface ) (String ) (EffectFn1 String Unit ) Unit
322
322
323
323
-- | Writes a query to the output, waits
324
324
-- | for user input to be provided on input, then invokes
@@ -338,9 +338,9 @@ foreign import questionImpl :: EffectFn3 (Interface) (String) ((String -> Effect
338
338
-- |
339
339
-- | The callback function passed to `rl.question()` does not follow the typical pattern of accepting an Error object or null as the first argument. The callback is called with the provided answer as the only argument.
340
340
question' :: String -> { signal :: AbortSignal } -> (String -> Effect Unit ) -> Interface -> Effect Unit
341
- question' text opts cb iface = runEffectFn4 questionOptsCbImpl iface text opts cb
341
+ question' text opts cb iface = runEffectFn4 questionOptsCbImpl iface text opts $ mkEffectFn1 cb
342
342
343
- foreign import questionOptsCbImpl :: EffectFn4 (Interface ) (String ) { signal :: AbortSignal } (( String -> Effect Unit ) ) Unit
343
+ foreign import questionOptsCbImpl :: EffectFn4 (Interface ) (String ) { signal :: AbortSignal } (EffectFn1 String Unit ) Unit
344
344
345
345
-- | The rl.resume() method resumes the input stream if it has been paused.
346
346
resume :: Interface -> Effect Unit
You can’t perform that action at this time.
0 commit comments