mirror of
https://github.com/documentationjs/documentation.git
synced 2026-01-25 14:26:29 +00:00
Add @interface support
This commit is contained in:
parent
e9d17e8795
commit
40af71635f
@ -79,7 +79,12 @@ var flatteners = {
|
||||
'instance': function (result) {
|
||||
result.scope = 'instance';
|
||||
},
|
||||
// 'interface'
|
||||
'interface': function (result, tag) {
|
||||
result.interface = true;
|
||||
if (tag.description) {
|
||||
result.name = tag.description;
|
||||
}
|
||||
},
|
||||
'kind': function (result, tag) {
|
||||
result.kind = tag.kind;
|
||||
},
|
||||
|
||||
@ -254,6 +254,18 @@ test('parse - @instance', function (t) {
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('parse - @interface', function (t) {
|
||||
t.deepEqual(evaluate(function () {
|
||||
/** @interface */
|
||||
})[0].interface, true, 'anonymous');
|
||||
|
||||
t.deepEqual(evaluate(function () {
|
||||
/** @interface Foo */
|
||||
})[0].name, 'Foo', 'named');
|
||||
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('parse - @kind', function (t) {
|
||||
t.equal(evaluate(function () {
|
||||
/** @kind class */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user