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
The (relatively new) function getBooleanInput in core bundles the parsing of a YAML boolean with getInput. However, that parsing functionality would be useful on its own.
I suggest to factor out function parseYAMLBoolean(text: string): boolean from getBooleanInput such that the latter is essentially just a composition of parseYAMLBoolean and getInput:
functiongetBooleanInput(name: string,options?: InputOptions): boolean{try{returnparseYAMLBoolean(getInput(name,options));}catch ... {// Throw the informative error referring to "name" here}}
The (relatively new) function
getBooleanInput
incore
bundles the parsing of a YAML boolean withgetInput
. However, that parsing functionality would be useful on its own.I suggest to factor out
function parseYAMLBoolean(text: string): boolean
fromgetBooleanInput
such that the latter is essentially just a composition ofparseYAMLBoolean
andgetInput
:toolkit/packages/core/src/core.ts
Lines 164 to 181 in b2d865f
The text was updated successfully, but these errors were encountered: