Skip to content

Commit 99eda22

Browse files
authored
Improve docs template helper properties.js (#5832)
1 parent 3790c59 commit 99eda22

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/templates/properties.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ module.exports.fullname = function fullname({ item }) {
3535

3636
module.exports.inheritance = function ({ item, build }) {
3737
if (!isNodeType('ContractDefinition', item)) {
38-
throw new Error('used inherited-items on non-contract');
38+
throw new Error('inheritance modifier used on non-contract');
3939
}
4040

4141
return item.linearizedBaseContracts
@@ -65,14 +65,14 @@ module.exports['has-internal-variables'] = function ({ item }) {
6565

6666
module.exports.functions = function ({ item }) {
6767
return [
68-
...[...findAll('FunctionDefinition', item)].filter(f => f.visibility !== 'private'),
69-
...[...findAll('VariableDeclaration', item)].filter(f => f.visibility === 'public'),
68+
...findAll('FunctionDefinition', item).filter(f => f.visibility !== 'private'),
69+
...findAll('VariableDeclaration', item).filter(f => f.visibility === 'public'),
7070
];
7171
};
7272

7373
module.exports.returns2 = function ({ item }) {
7474
if (isNodeType('VariableDeclaration', item)) {
75-
return [{ type: item.typeDescriptions.typeString }];
75+
return [{ type: item.typeName.typeDescriptions.typeString }];
7676
} else {
7777
return item.returns;
7878
}

0 commit comments

Comments
 (0)