(fn: NonNullable<TsType['fnOrConstructor']>)
| 114 | } |
| 115 | |
| 116 | function formatFnOrConstructorType(fn: NonNullable<TsType['fnOrConstructor']>): string { |
| 117 | const typeParams = fn.typeParams?.map(t => t.name).join(', ') |
| 118 | const typeParamsStr = typeParams ? `<${typeParams}>` : '' |
| 119 | const params = fn.params.map(p => formatParam(p)).join(', ') |
| 120 | const ret = formatType(fn.tsType) || 'void' |
| 121 | return `${typeParamsStr}(${params}) => ${ret}` |
| 122 | } |
| 123 | |
| 124 | function formatTypeLiteralType(lit: NonNullable<TsType['typeLiteral']>): string { |
| 125 | const parts: string[] = [] |
no test coverage detected