Skip to content

Commit 8b04029

Browse files
committed
feat(output): Display type information for typedefs in Markdown and HTML
This is a follow-up commit because I didn't format the original commit message properly and didn't want to ammend master.
1 parent f9ddb9c commit 8b04029

File tree

3 files changed

+0
-70
lines changed

3 files changed

+0
-70
lines changed

default_theme/section._

-2
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,12 @@
1818
<%= md(section.description) %>
1919

2020
<div class='pre p1 fill-light mt0'><%= signature(section) %></div>
21-
2221
<% if (section.type) { %>
2322
<p>
2423
Type:
2524
<%= formatType(section.type) %>
2625
</p>
2726
<% } %>
28-
2927
<% if (section.augments) { %>
3028
<p>
3129
Extends

test/fixture/html/nested.config-output.html

-34
Original file line numberDiff line numberDiff line change
@@ -256,9 +256,7 @@ <h3 class='fl m0' id='klass'>
256256

257257

258258
<div class='pre p1 fill-light mt0'>new Klass(foo: any)</div>
259-
260259

261-
262260

263261
<p>
264262
Extends
@@ -319,9 +317,7 @@ <h3 class='fl m0' id='klass'>
319317

320318

321319
<div class='pre p1 fill-light mt0'>isClass(other: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>, also: any): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></div>
322-
323320

324-
325321

326322

327323

@@ -396,9 +392,7 @@ <h3 class='fl m0' id='klass'>
396392

397393

398394
<div class='pre p1 fill-light mt0'>isWeird(other: Weird): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></div>
399-
400395

401-
402396

403397

404398

@@ -464,9 +458,7 @@ <h3 class='fl m0' id='klass'>
464458

465459

466460
<div class='pre p1 fill-light mt0'>isBuffer(buf: (<a href="https://nodejs.org/api/buffer.html">Buffer</a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>), size: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>?): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></div>
467-
468461

469-
470462

471463

472464

@@ -542,9 +534,7 @@ <h3 class='fl m0' id='klass'>
542534

543535

544536
<div class='pre p1 fill-light mt0'>isArrayOfBuffers(buffers: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a>&#x3C;<a href="https://nodejs.org/api/buffer.html">Buffer</a>>): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></div>
545-
546537

547-
548538

549539

550540

@@ -618,9 +608,7 @@ <h3 class='fl m0' id='klass'>
618608

619609

620610
<div class='pre p1 fill-light mt0'>MAGIC_NUMBER</div>
621-
622611

623-
624612

625613

626614

@@ -665,9 +653,7 @@ <h3 class='fl m0' id='klass'>
665653

666654

667655
<div class='pre p1 fill-light mt0'>event</div>
668-
669656

670-
671657

672658

673659

@@ -720,9 +706,7 @@ <h3 class='fl m0' id='klass'>
720706

721707

722708
<div class='pre p1 fill-light mt0'>getFoo(): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">Number</a></div>
723-
724709

725-
726710

727711

728712

@@ -782,9 +766,7 @@ <h3 class='fl m0' id='klass'>
782766

783767

784768
<div class='pre p1 fill-light mt0'>withOptions(options: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>, otherOptions: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>?)</div>
785-
786769

787-
788770

789771

790772

@@ -889,9 +871,7 @@ <h3 class='fl m0' id='customerror'>
889871

890872

891873
<div class='pre p1 fill-light mt0'>CustomError</div>
892-
893874

894-
895875

896876

897877

@@ -965,9 +945,7 @@ <h3 class='fl m0' id='bar'>
965945

966946

967947
<div class='pre p1 fill-light mt0'>bar(): <a href="#klass">Klass</a></div>
968-
969948

970-
971949

972950

973951

@@ -1021,9 +999,7 @@ <h3 class='fl m0' id='bar'>
1021999

10221000

10231001
<div class='pre p1 fill-light mt0'>bar(toys: ...<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">Number</a>): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined">undefined</a></div>
1024-
10251002

1026-
10271003

10281004

10291005

@@ -1092,9 +1068,7 @@ <h3 class='fl m0' id='bar'>
10921068

10931069

10941070
<div class='pre p1 fill-light mt0'>bar(): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined">undefined</a></div>
1095-
10961071

1097-
10981072

10991073

11001074

@@ -1148,9 +1122,7 @@ <h3 class='fl m0' id='foo'>
11481122

11491123

11501124
<div class='pre p1 fill-light mt0'>new Foo()</div>
1151-
11521125

1153-
11541126

11551127

11561128

@@ -1191,9 +1163,7 @@ <h3 class='fl m0' id='foo'>
11911163

11921164

11931165
<div class='pre p1 fill-light mt0'>bar</div>
1194-
11951166

1196-
11971167

11981168

11991169

@@ -1249,9 +1219,7 @@ <h3 class='fl m0' id='customstreams'>
12491219

12501220

12511221
<div class='pre p1 fill-light mt0'>customStreams</div>
1252-
12531222

1254-
12551223

12561224

12571225

@@ -1290,9 +1258,7 @@ <h3 class='fl m0' id='customstreams'>
12901258

12911259

12921260
<div class='pre p1 fill-light mt0'>new passthrough()</div>
1293-
12941261

1295-
12961262

12971263

12981264

test/fixture/html/nested.output.files

-34
Original file line numberDiff line numberDiff line change
@@ -218,9 +218,7 @@
218218

219219

220220
<div class='pre p1 fill-light mt0'>new Klass(foo: any)</div>
221-
222221

223-
224222

225223
<p>
226224
Extends
@@ -281,9 +279,7 @@ This is a [link to something that does not exist]<a href="DoesNot">DoesNot</a></
281279

282280

283281
<div class='pre p1 fill-light mt0'>isClass(other: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>, also: any): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></div>
284-
285282

286-
287283

288284

289285

@@ -358,9 +354,7 @@ the referenced class type</p>
358354

359355

360356
<div class='pre p1 fill-light mt0'>isWeird(other: Weird): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></div>
361-
362357

363-
364358

365359

366360

@@ -426,9 +420,7 @@ the referenced class type</p>
426420

427421

428422
<div class='pre p1 fill-light mt0'>isBuffer(buf: (<a href="https://nodejs.org/api/buffer.html">Buffer</a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>), size: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>?): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></div>
429-
430423

431-
432424

433425

434426

@@ -504,9 +496,7 @@ the referenced class type</p>
504496

505497

506498
<div class='pre p1 fill-light mt0'>isArrayOfBuffers(buffers: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a>&#x3C;<a href="https://nodejs.org/api/buffer.html">Buffer</a>>): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></div>
507-
508499

509-
510500

511501

512502

@@ -580,9 +570,7 @@ k.isArrayOfBuffers();</pre>
580570

581571

582572
<div class='pre p1 fill-light mt0'>MAGIC_NUMBER</div>
583-
584573

585-
586574

587575

588576

@@ -627,9 +615,7 @@ k.isArrayOfBuffers();</pre>
627615

628616

629617
<div class='pre p1 fill-light mt0'>event</div>
630-
631618

632-
633619

634620

635621

@@ -682,9 +668,7 @@ k.isArrayOfBuffers();</pre>
682668

683669

684670
<div class='pre p1 fill-light mt0'>getFoo(): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">Number</a></div>
685-
686671

687-
688672

689673

690674

@@ -744,9 +728,7 @@ k.isArrayOfBuffers();</pre>
744728

745729

746730
<div class='pre p1 fill-light mt0'>withOptions(options: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>, otherOptions: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>?)</div>
747-
748731

749-
750732

751733

752734

@@ -851,9 +833,7 @@ k.isArrayOfBuffers();</pre>
851833

852834

853835
<div class='pre p1 fill-light mt0'>CustomError</div>
854-
855836

856-
857837

858838

859839

@@ -927,9 +907,7 @@ like a <a href="#klass">klass</a></p>
927907

928908

929909
<div class='pre p1 fill-light mt0'>bar(): <a href="#klass">Klass</a></div>
930-
931910

932-
933911

934912

935913

@@ -983,9 +961,7 @@ like a <a href="#klass">klass</a></p>
983961

984962

985963
<div class='pre p1 fill-light mt0'>bar(toys: ...<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">Number</a>): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined">undefined</a></div>
986-
987964

988-
989965

990966

991967

@@ -1054,9 +1030,7 @@ like a <a href="#klass">klass</a>. This needs a <a href="https://developer.mozil
10541030

10551031

10561032
<div class='pre p1 fill-light mt0'>bar(): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined">undefined</a></div>
1057-
10581033

1059-
10601034

10611035

10621036

@@ -1110,9 +1084,7 @@ like a <a href="#klass">klass</a>. This needs a <a href="https://developer.mozil
11101084

11111085

11121086
<div class='pre p1 fill-light mt0'>new Foo()</div>
1113-
11141087

1115-
11161088

11171089

11181090

@@ -1153,9 +1125,7 @@ like a <a href="#klass">klass</a>. This needs a <a href="https://developer.mozil
11531125

11541126

11551127
<div class='pre p1 fill-light mt0'>bar</div>
1156-
11571128

1158-
11591129

11601130

11611131

@@ -1211,9 +1181,7 @@ like a <a href="#klass">klass</a>. This needs a <a href="https://developer.mozil
12111181

12121182

12131183
<div class='pre p1 fill-light mt0'>customStreams</div>
1214-
12151184

1216-
12171185

12181186

12191187

@@ -1252,9 +1220,7 @@ like a <a href="#klass">klass</a>. This needs a <a href="https://developer.mozil
12521220

12531221

12541222
<div class='pre p1 fill-light mt0'>new passthrough()</div>
1255-
12561223

1257-
12581224

12591225

12601226

0 commit comments

Comments
 (0)