MCPcopy Index your code
hub / github.com/documentationjs/documentation / typeAnnotation

Function typeAnnotation

src/type_annotation.js:5–19  ·  view source on GitHub ↗
(type)

Source from the content-addressed store, hash-verified

3import tsDoctrine from './ts_doctrine.js';
4
5function 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
21export default typeAnnotation;

Callers 4

inferTypeFunction · 0.85
paramToDocFunction · 0.85
propertyToDocFunction · 0.85
inferReturnFunction · 0.85

Calls 2

flowDoctrineFunction · 0.85
tsDoctrineFunction · 0.85

Tested by

no test coverage detected