MCPcopy Index your code
hub / github.com/nodejs/node / isAnySignature

Function isAnySignature

test/fixtures/snapshot/typescript.js:64334–64338  ·  view source on GitHub ↗

* Returns true if `s` is `(...args: any[]) => any` or `(this: any, ...args: any[]) => any`

(s)

Source from the content-addressed store, hash-verified

64332 * Returns true if `s` is `(...args: any[]) => any` or `(this: any, ...args: any[]) => any`
64333 */
64334 function isAnySignature(s) {
64335 return !s.typeParameters && (!s.thisParameter || isTypeAny(getTypeOfParameter(s.thisParameter))) && s.parameters.length === 1 &&
64336 signatureHasRestParameter(s) && (getTypeOfParameter(s.parameters[0]) === anyArrayType || isTypeAny(getTypeOfParameter(s.parameters[0]))) &&
64337 isTypeAny(getReturnTypeOfSignature(s));
64338 }
64339 /**
64340 * See signatureRelatedTo, compareSignaturesIdentical
64341 */

Callers 1

compareSignaturesRelatedFunction · 0.85

Calls 4

isTypeAnyFunction · 0.85
getTypeOfParameterFunction · 0.85
getReturnTypeOfSignatureFunction · 0.85

Tested by

no test coverage detected