import ts from 'typescript' ; import * as type_ from './type_' ; export function getParameters ( signature ) { return signature . parameters ; } export function getReturnType ( signature ) { return signature . getReturnType ( ) ; } export function isFailure ( signature ) { const sig = signature ; return ( sig . declaration === undefined && sig . typeParameters === undefined && sig . thisParameter === undefined && sig . parameters . length === 0 && ( sig . resolvedReturnType === undefined || type_ . isAny ( sig . resolvedReturnType ) ) && sig . resolvedTypePredicate === undefined && sig . minArgumentCount === 0 && ! sig . hasRestParameter && ! sig . hasLiteralTypes ) ; } export function getDeclaration ( signature ) { return signature . getDeclaration ( ) ; }