INNER CODE UNIT · TypeScript

getInput

EndBug/add-and-commit · src/io.ts:57

export function getInput<T extends input>(name: T, parseAsBool: true): boolean;
export function getInput<T extends input>(
  name: T,
  parseAsBool?: false,
): InputTypes[T];
export function getInput<T extends input>(
  name: T,
  parseAsBool = false,
): InputTypes[T] | boolean {
  if (parseAsBool) return core.getBooleanInput(name);
  return core.getInput(name) as InputTypes[T];
}

export function setOutput<T extends output>(name: T, value: OutputTypes[T]) {
  core.debug(`Setting output: ${name}=${value}`);
  outputs[name] = value;
  core.setOutput(name, value);
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…