| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | 1× 2× 1× 1× 1× | // ISC, Copyright 2017 Jaco Greeff
// @flow
import type { InterfaceInputType, InterfaceOutputType } from './types';
function callSignature (name: string, _inputs: Array<InterfaceInputType>, _output: InterfaceOutputType): string {
const inputs: Array<string> = _inputs.map(({ name, type }) => `${name}: ${type}`);
const output = _output.type;
return `${name}(${inputs.join(', ')}) => ${output}`;
}
module.exports = {
callSignature
};
|