import type * as ts from 'typescript' ; import { GetReturnNodeFromBody } from './bodyReturnType' ; export function GetFunctionReturnType ( node ) { let returnType ; if ( node . type ) { returnType = node . type ; } else { returnType = GetReturnNodeFromBody ( node ) ; } return returnType ; }