docs(typedoc): document function examples

This commit is contained in:
2024-03-12 20:42:34 +02:00
parent ec41aebad9
commit fdb28fa612
10 changed files with 179 additions and 17 deletions

View File

@@ -20,6 +20,14 @@
/**
* Conditionally joins given strings
*
* @example
* ```ts
* let isAdmin = true
*
* // prints "Hello, Administrator!"
* console.log(conditionalJoin(["Hello,", isAdmin ? "Administrator" : "User", "!"], " "))
* ```
*
* @param array - strings to join
* @param joinChar - character used to join strings
* @returns new string