mirror of
https://github.com/actions/setup-python.git
synced 2026-09-19 10:21:28 +00:00
Initial pass
This commit is contained in:
+13
@@ -0,0 +1,13 @@
|
||||
"use strict";
|
||||
|
||||
const enumerationValues = new Set(["hidden", "visible", "prerender"]);
|
||||
module.exports = {
|
||||
enumerationValues,
|
||||
convert(value, { context = "The provided value" } = {}) {
|
||||
const string = `${value}`;
|
||||
if (!enumerationValues.has(value)) {
|
||||
throw new TypeError(`${context} '${value}' is not a valid enumeration value for VisibilityState`);
|
||||
}
|
||||
return string;
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user