File tree Expand file tree Collapse file tree 5 files changed +15
-3
lines changed Expand file tree Collapse file tree 5 files changed +15
-3
lines changed Original file line number Diff line number Diff line change 1
1
## 0.8.4
2
2
* [ enhancement] Only include generator metadata in the package ` index.html ` file.
3
3
* [ bug] Fixed the display of deprecated properties.
4
+ * [ bug] show generics for typedefs
5
+ * [ bug] cleanly unzip docs on Mac
4
6
5
7
## 0.8.3
6
8
* [ enhancement] Added ` --[no-]include-source ` option.
Original file line number Diff line number Diff line change @@ -308,7 +308,7 @@ class TypedefTemplateData extends TemplateData<Typedef> {
308
308
String get title =>
309
309
'${typeDef .name } typedef - ${library .name } library - Dart API' ;
310
310
String get layoutTitle =>
311
- _layoutTitle (typeDef.name , 'typedef' , typeDef.isDeprecated);
311
+ _layoutTitle (typeDef.nameWithGenerics , 'typedef' , typeDef.isDeprecated);
312
312
String get metaDescription =>
313
313
'API docs for the ${typeDef .name } property from the '
314
314
'${library .name } library, for the Dart programming language.' ;
Original file line number Diff line number Diff line change @@ -1498,6 +1498,16 @@ class Typedef extends ModelElement implements EnclosedElement {
1498
1498
1499
1499
String get fileName => '$name .html' ;
1500
1500
1501
+ String get nameWithGenerics {
1502
+ if (! modelType.isParameterizedType) return name;
1503
+ String n = '$name <${_typeParameters .map ((t ) => t .name ).join (', ' )}>' ;
1504
+ return '$name <${_typeParameters .map ((t ) => t .name ).join (', ' )}>' ;
1505
+ }
1506
+
1507
+ List <TypeParameter > get _typeParameters => _typedef.typeParameters.map ((f) {
1508
+ return new TypeParameter (f, library);
1509
+ }).toList ();
1510
+
1501
1511
String get linkedReturnType => modelType != null
1502
1512
? modelType.createLinkedReturnTypeName ()
1503
1513
: _typedef.returnType.name;
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ const String COLOR_ORANGE = 'orange';
19
19
const String COMPLEX_COLOR = 'red' + '-' + 'green' + '-' + 'blue' ;
20
20
const ConstantCat MY_CAT = const ConstantCat ('tabby' );
21
21
22
- typedef String processMessage (String msg);
22
+ typedef String processMessage < T > (String msg);
23
23
24
24
/// This should [not work] .
25
25
const incorrectDocReferenceFromEx = 'doh' ;
Original file line number Diff line number Diff line change 53
53
</ ol >
54
54
< div class ="title-description ">
55
55
< h1 class ="title ">
56
- < span class ="kind "> typedef</ span > processMessage
56
+ < span class ="kind "> typedef</ span > processMessage<T>
57
57
</ h1 >
58
58
</ div >
59
59
</ div > <!-- /col -->
You can’t perform that action at this time.
0 commit comments