aboutsummaryrefslogtreecommitdiff
path: root/api
diff options
context:
space:
mode:
Diffstat (limited to 'api')
-rw-r--r--api/api.md4
-rw-r--r--api/builtins.md4
-rw-r--r--api/builtins.yaml5
3 files changed, 7 insertions, 6 deletions
diff --git a/api/api.md b/api/api.md
index ec6ffb49..f52691d3 100644
--- a/api/api.md
+++ b/api/api.md
@@ -166,7 +166,7 @@ say("world!")
## setenv
```tomo
-setenv : func(name: Text, value: Text -> Void)
+setenv : func(name: Text, value: Text? -> Void)
```
Sets an environment variable.
@@ -174,7 +174,7 @@ Sets an environment variable.
Argument | Type | Description | Default
---------|------|-------------|---------
name | `Text` | The name of the environment variable to set. | -
-value | `Text` | The new value of the environment variable. | -
+value | `Text?` | The new value of the environment variable. If `none`, then the environment variable will be unset. | -
**Return:** Nothing.
diff --git a/api/builtins.md b/api/builtins.md
index 6d042741..2ef14275 100644
--- a/api/builtins.md
+++ b/api/builtins.md
@@ -166,7 +166,7 @@ say("world!")
## setenv
```tomo
-setenv : func(name: Text, value: Text -> Void)
+setenv : func(name: Text, value: Text? -> Void)
```
Sets an environment variable.
@@ -174,7 +174,7 @@ Sets an environment variable.
Argument | Type | Description | Default
---------|------|-------------|---------
name | `Text` | The name of the environment variable to set. | -
-value | `Text` | The new value of the environment variable. | -
+value | `Text?` | The new value of the environment variable. If `none`, then the environment variable will be unset. | -
**Return:** Nothing.
diff --git a/api/builtins.yaml b/api/builtins.yaml
index 764a1bd4..af7c9319 100644
--- a/api/builtins.yaml
+++ b/api/builtins.yaml
@@ -157,9 +157,10 @@ setenv:
description: >
The name of the environment variable to set.
value:
- type: 'Text'
+ type: 'Text?'
description: >
- The new value of the environment variable.
+ The new value of the environment variable. If `none`, then the
+ environment variable will be unset.
example: |
setenv("FOOBAR", "xyz")