Last active
August 8, 2018 17:02
-
-
Save artalar/10bbdd64422b2b3b022f9fdc2d00f230 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import * as t from "jsdoc-runtime"; | |
| const tSqrt = t.declare.number | |
| // if input will not valid | |
| // return to last (this) workflow node | |
| .default(t.context.fallback(() => 0)) | |
| // used in autotests | |
| .from(0) | |
| .to(t.int) | |
| const sqrt = t` | |
| The function returns the square root of a number | |
| @param ${tSqrt} number | |
| @return ${t.context.add({ result: tSqrt.or(t.long) })} | |
| `(number => { | |
| const result = t`${t.context.result}`(Math.sqrt(number)); | |
| return result; | |
| }); |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
TODO: