Skip to content

Commit

Permalink
fix(lib): input return result
Browse files Browse the repository at this point in the history
  • Loading branch information
snowyu committed Aug 28, 2024
1 parent cf66cac commit 3a78768
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/input.ai.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ version: 0.1.0
type: lib
description: |-
This script will wait for user input.
Currently the console input is only supported.
Browser input TODO.
tag:
- user
- input
Expand All @@ -15,7 +17,7 @@ output:
type: 'object'
properties:
question: {type: 'string'}
answer: {type: 'string'}
answer: {type: ['string', 'boolean', 'number', 'array', 'object']}
---
- !fn |-
toText(value) {
Expand All @@ -35,4 +37,5 @@ output:
}
- $set:
result: $consoleInput
- $echo: "result.answer"
# - $print: ?=result
- $echo: ?=result.answer

0 comments on commit 3a78768

Please sign in to comment.