You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/builtins/Repl/typecheck.md
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -1,29 +1,29 @@
1
-
# typecheck
1
+
##typecheck
2
2
3
3
Use `typecheck` to run the Pact static type checker on a specified `module` name.
4
4
5
-
## Basic syntax
5
+
###Basic syntax
6
6
7
7
To run the static type checker on a specified `module` name, use the following syntax:
8
8
9
9
```pact
10
10
(typecheck module)
11
11
```
12
12
13
-
## Arguments
13
+
###Arguments
14
14
15
15
Use the following argument when calling the `typecheck` function:
16
16
17
17
| Argument | Type | Description |
18
18
|----------|------|-------------|
19
19
|`module`| string | Specifies the name of the module to run the static type checker on. |
20
20
21
-
## Return value
21
+
###Return value
22
22
23
23
If type checking for the module is successful, the `typecheck` function returns the unit value `()`.
24
24
If type checking fails, the function returns an error.
25
25
26
-
## Examples
26
+
###Examples
27
27
28
28
The following example demonstrates a simple `.repl` file with the module declaration for a `rewards` module that then calls the static type checker to check the `rewards` module:
0 commit comments