Skip to content

Commit 8cc34b6

Browse files
authoredJan 29, 2017
fix(scopes): Support inner scope (#665)
* fix(scopes): Support inner scope The purpose and usage of inner is still unclear, unfortunately, so this is an interim fix at best. Fixes #652 * Improve comment typedef while we're at it
1 parent 8295363 commit 8cc34b6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+678
-328
lines changed
 

‎declarations/comment.js

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,9 @@ declare type CommentTag = {
7171
declare type CommentMembers = {
7272
static: Array<Comment>,
7373
instance: Array<Comment>,
74-
events: Array<Comment>
74+
events: Array<Comment>,
75+
global: Array<Comment>,
76+
inner: Array<Comment>
7577
};
7678

7779
declare type CommentExample = {
@@ -84,6 +86,20 @@ declare type Remark = {
8486
children: Array<Object>
8587
};
8688

89+
declare type Access = 'private' | 'public' | 'protected';
90+
declare type Scope = 'instance' | 'static' | 'inner' | 'global';
91+
declare type Kind = 'class' |
92+
'constant' |
93+
'event' |
94+
'external' |
95+
'file' |
96+
'function' |
97+
'member' |
98+
'mixin' |
99+
'module' |
100+
'namespace' |
101+
'typedef';
102+
87103
declare type Comment = {
88104
errors: Array<CommentError>,
89105
tags: Array<CommentTag>,
@@ -106,10 +122,11 @@ declare type Comment = {
106122
members: CommentMembers,
107123

108124
name?: string,
109-
kind?: string,
125+
kind?: Kind,
126+
110127
memberof?: string,
111-
scope?: string,
112-
access?: string,
128+
scope?: Scope,
129+
access?: Access,
113130
alias?: string,
114131

115132
copyright?: string,
@@ -126,6 +143,12 @@ declare type Comment = {
126143

127144
path?: Array<{
128145
name: string,
129-
scope: string
146+
scope: Scope
130147
}>
131148
};
149+
150+
declare type ReducedComment = {
151+
name: string,
152+
kind: ?Kind,
153+
scope?: ?Scope
154+
}

‎default_theme/index._

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,18 @@
5656
<% }) %>
5757
</ul>
5858
<% } %>
59+
<% if (doc.members.inner && doc.members.inner.length) { %>
60+
<ul class='list-reset py1-ul pl1'>
61+
<li class='h5'><span>Inner members</span></li>
62+
<% doc.members.inner.forEach(function(member) { %>
63+
<li><a
64+
href='#<%=member.namespace%>'
65+
class='regular pre-open'>
66+
#<%- member.name %>
67+
</a></li>
68+
<% }) %>
69+
</ul>
70+
<% } %>
5971
<% if (doc.members.events && doc.members.events.length) { %>
6072
<ul class='list-reset py1-ul pl1'>
6173
<li class='h5'>Events</li>

0 commit comments

Comments
 (0)
Please sign in to comment.