File tree 9 files changed +112
-61
lines changed 9 files changed +112
-61
lines changed Original file line number Diff line number Diff line change 1
1
/* @flow */
2
2
'use strict' ;
3
- var Syntax = require ( 'doctrine' ) . Syntax , u = require ( 'unist-builder' ) ;
3
+ var Syntax = require ( 'doctrine-temporary-fork' ) . Syntax ,
4
+ u = require ( 'unist-builder' ) ;
4
5
5
6
/**
6
7
* Shortcut to create a new text node
Original file line number Diff line number Diff line change 2
2
'use strict' ;
3
3
var remark = require ( 'remark' ) ,
4
4
html = require ( 'remark-html' ) ,
5
- Syntax = require ( 'doctrine' ) . Syntax ,
5
+ Syntax = require ( 'doctrine-temporary-fork ' ) . Syntax ,
6
6
u = require ( 'unist-builder' ) ,
7
7
_rerouteLinks = require ( './reroute_links' ) ,
8
8
highlighter = require ( '../highlighter' ) ,
Original file line number Diff line number Diff line change 1
1
'use strict' ;
2
2
/* @flow */
3
3
4
- var doctrine = require ( 'doctrine' ) ;
4
+ var doctrine = require ( 'doctrine-temporary-fork ' ) ;
5
5
var parseMarkdown = require ( './parse_markdown' ) ;
6
6
7
7
/**
Original file line number Diff line number Diff line change 23
23
"chokidar" : " ^1.2.0" ,
24
24
"concat-stream" : " ^1.5.0" ,
25
25
"disparity" : " ^2.0.0" ,
26
- "doctrine" : " ^ 2.0.0" ,
26
+ "doctrine-temporary-fork " : " 2.0.0-alpha-allowarrayindex " ,
27
27
"get-comments" : " ^1.0.1" ,
28
28
"git-url-parse" : " ^6.0.1" ,
29
29
"github-slugger" : " 1.1.1" ,
Original file line number Diff line number Diff line change @@ -101,8 +101,8 @@ function foo(address) {
101
101
* iterator destructure (RestElement)
102
102
*
103
103
* @param {Array } input
104
- * @param {any } input.x head of iterator
105
- * @param {any[] } ...input.xs body of iterator
104
+ * @param {any } input.0 head of iterator
105
+ * @param {...any } input.xs body of iterator
106
106
*
107
107
* @returns {any[] } rotated such that the last element was the first
108
108
*/
Original file line number Diff line number Diff line change 2552
2552
"type" : " NameExpression" ,
2553
2553
"name" : " any"
2554
2554
},
2555
- "name" : " input.x "
2555
+ "name" : " input.0 "
2556
2556
},
2557
2557
{
2558
2558
"title" : " param" ,
2559
- "description" : " ...input.xs body of iterator" ,
2559
+ "description" : " body of iterator" ,
2560
2560
"lineNumber" : 6 ,
2561
2561
"type" : {
2562
- "type" : " TypeApplication " ,
2562
+ "type" : " RestType " ,
2563
2563
"expression" : {
2564
2564
"type" : " NameExpression" ,
2565
- "name" : " Array"
2566
- },
2567
- "applications" : [
2568
- {
2569
- "type" : " NameExpression" ,
2570
- "name" : " any"
2571
- }
2572
- ]
2565
+ "name" : " any"
2566
+ }
2573
2567
},
2574
- "name" : null ,
2575
- "errors" : [
2576
- " Missing or invalid tag name"
2577
- ]
2568
+ "name" : " input.xs"
2578
2569
},
2579
2570
{
2580
2571
"title" : " returns" ,
2618
2609
}
2619
2610
},
2620
2611
"augments" : [],
2621
- "errors" : [
2622
- {
2623
- "message" : " Missing or invalid tag name"
2624
- }
2625
- ],
2612
+ "errors" : [],
2626
2613
"examples" : [],
2627
2614
"params" : [
2628
2615
{
2636
2623
"properties" : [
2637
2624
{
2638
2625
"title" : " param" ,
2639
- "name" : " input.x " ,
2626
+ "name" : " input.0 " ,
2640
2627
"lineNumber" : 5 ,
2641
2628
"description" : {
2642
2629
"type" : " root" ,
2695
2682
"name" : " any"
2696
2683
}
2697
2684
},
2698
- {
2699
- "title" : " param" ,
2700
- "name" : " input.0" ,
2701
- "lineNumber" : 109
2702
- },
2703
2685
{
2704
2686
"title" : " param" ,
2705
2687
"name" : " input.xs" ,
2706
- "lineNumber" : 109 ,
2688
+ "lineNumber" : 6 ,
2689
+ "description" : {
2690
+ "type" : " root" ,
2691
+ "children" : [
2692
+ {
2693
+ "type" : " paragraph" ,
2694
+ "children" : [
2695
+ {
2696
+ "type" : " text" ,
2697
+ "value" : " body of iterator" ,
2698
+ "position" : {
2699
+ "start" : {
2700
+ "line" : 1 ,
2701
+ "column" : 1 ,
2702
+ "offset" : 0
2703
+ },
2704
+ "end" : {
2705
+ "line" : 1 ,
2706
+ "column" : 17 ,
2707
+ "offset" : 16
2708
+ },
2709
+ "indent" : []
2710
+ }
2711
+ }
2712
+ ],
2713
+ "position" : {
2714
+ "start" : {
2715
+ "line" : 1 ,
2716
+ "column" : 1 ,
2717
+ "offset" : 0
2718
+ },
2719
+ "end" : {
2720
+ "line" : 1 ,
2721
+ "column" : 17 ,
2722
+ "offset" : 16
2723
+ },
2724
+ "indent" : []
2725
+ }
2726
+ }
2727
+ ],
2728
+ "position" : {
2729
+ "start" : {
2730
+ "line" : 1 ,
2731
+ "column" : 1 ,
2732
+ "offset" : 0
2733
+ },
2734
+ "end" : {
2735
+ "line" : 1 ,
2736
+ "column" : 17 ,
2737
+ "offset" : 16
2738
+ }
2739
+ }
2740
+ },
2707
2741
"type" : {
2708
- "type" : " RestType"
2742
+ "type" : " RestType" ,
2743
+ "expression" : {
2744
+ "type" : " NameExpression" ,
2745
+ "name" : " any"
2746
+ }
2709
2747
}
2710
2748
}
2711
2749
]
Original file line number Diff line number Diff line change @@ -133,8 +133,7 @@ iterator destructure (RestElement)
133
133
** Parameters**
134
134
135
135
- ` input ` ** [ Array] ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array ) **
136
- - ` input.x ` ** any** head of iterator
137
- - ` input.0 `
138
- - ` input.xs ` ** ...any**
136
+ - ` input.0 ` ** any** head of iterator
137
+ - ` input.xs ` ** ...any** body of iterator
139
138
140
139
Returns ** [ Array] ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array ) < ; any>** rotated such that the last element was the first
Original file line number Diff line number Diff line change 2341
2341
"children" : [
2342
2342
{
2343
2343
"type" : " inlineCode" ,
2344
- "value" : " input.x "
2344
+ "value" : " input.0 "
2345
2345
},
2346
2346
{
2347
2347
"type" : " text" ,
2399
2399
}
2400
2400
]
2401
2401
},
2402
- {
2403
- "type" : " listItem" ,
2404
- "children" : [
2405
- {
2406
- "type" : " paragraph" ,
2407
- "children" : [
2408
- {
2409
- "type" : " inlineCode" ,
2410
- "value" : " input.0"
2411
- },
2412
- {
2413
- "type" : " text" ,
2414
- "value" : " "
2415
- },
2416
- {
2417
- "type" : " text" ,
2418
- "value" : " "
2419
- }
2420
- ]
2421
- }
2422
- ]
2423
- },
2424
2402
{
2425
2403
"type" : " listItem" ,
2426
2404
"children" : [
2451
2429
{
2452
2430
"type" : " text" ,
2453
2431
"value" : " "
2432
+ },
2433
+ {
2434
+ "type" : " paragraph" ,
2435
+ "children" : [
2436
+ {
2437
+ "type" : " text" ,
2438
+ "value" : " body of iterator" ,
2439
+ "position" : {
2440
+ "start" : {
2441
+ "line" : 1 ,
2442
+ "column" : 1 ,
2443
+ "offset" : 0
2444
+ },
2445
+ "end" : {
2446
+ "line" : 1 ,
2447
+ "column" : 17 ,
2448
+ "offset" : 16
2449
+ },
2450
+ "indent" : []
2451
+ }
2452
+ }
2453
+ ],
2454
+ "position" : {
2455
+ "start" : {
2456
+ "line" : 1 ,
2457
+ "column" : 1 ,
2458
+ "offset" : 0
2459
+ },
2460
+ "end" : {
2461
+ "line" : 1 ,
2462
+ "column" : 17 ,
2463
+ "offset" : 16
2464
+ },
2465
+ "indent" : []
2466
+ }
2454
2467
}
2455
2468
]
2456
2469
}
Original file line number Diff line number Diff line change 4
4
var _formatType = require ( '../lib/output/util/format_type' ) ,
5
5
LinkerStack = require ( '../lib/output/util/linker_stack' ) ,
6
6
remark = require ( 'remark' ) ,
7
- parse = require ( 'doctrine' ) . parse ,
7
+ parse = require ( 'doctrine-temporary-fork ' ) . parse ,
8
8
test = require ( 'tap' ) . test ;
9
9
10
10
function stringify ( children ) {
You can’t perform that action at this time.
0 commit comments