MCPcopy Create free account
hub / github.com/sindresorhus/execa / checkUndefinedOption

Function checkUndefinedOption

lib/stdio/type.js:82–86  ·  view source on GitHub ↗
(value, optionName, typeName)

Source from the content-addressed store, hash-verified

80};
81
82const checkUndefinedOption = (value, optionName, typeName) => {
83 if (value !== undefined) {
84 throw new TypeError(`The \`${optionName}\` option can only be defined when using a generator, not a ${typeName}.`);
85 }
86};
87
88const getGeneratorObjectType = ({transform, final, binary, objectMode}, optionName) => {
89 if (transform !== undefined && !isGenerator(transform)) {

Callers 1

validateNonGeneratorTypeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected