mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 12:11:56 +00:00
add comments to everything potentially consumer facing
This commit is contained in:
@@ -1,6 +1,14 @@
|
||||
import { DefaultString } from '../actions/input/inputSpecTypes'
|
||||
import { getRandomString } from './getRandomString'
|
||||
|
||||
/**
|
||||
* Resolves a DefaultString spec into a concrete string value.
|
||||
* If the spec is a plain string, returns it directly.
|
||||
* If it is a random-string specification, generates a random string accordingly.
|
||||
*
|
||||
* @param defaultSpec - A string literal or a random-string generation spec
|
||||
* @returns The resolved default string value
|
||||
*/
|
||||
export function getDefaultString(defaultSpec: DefaultString): string {
|
||||
if (typeof defaultSpec === 'string') {
|
||||
return defaultSpec
|
||||
|
||||
Reference in New Issue
Block a user