(type)
| 3 | import tsDoctrine from './ts_doctrine.js'; |
| 4 | |
| 5 | function typeAnnotation(type) { |
| 6 | if (t.isFlow(type)) { |
| 7 | if (t.isTypeAnnotation(type)) { |
| 8 | type = type.typeAnnotation; |
| 9 | } |
| 10 | |
| 11 | return flowDoctrine(type); |
| 12 | } |
| 13 | |
| 14 | if (t.isTSTypeAnnotation(type)) { |
| 15 | type = type.typeAnnotation; |
| 16 | } |
| 17 | |
| 18 | return tsDoctrine(type); |
| 19 | } |
| 20 | |
| 21 | export default typeAnnotation; |
no test coverage detected