1
0
mirror of https://github.com/oceanprotocol/docs.git synced 2024-11-26 19:49:26 +01:00

filter out static methods by default

This commit is contained in:
Matthias Kretschmann 2019-11-06 12:52:34 +01:00
parent dad281d32c
commit 6c998dc6c9
Signed by: m
GPG Key ID: 606EEEF3C479A91F

View File

@ -29,18 +29,19 @@ export const cleanTypedocData = (data, useClasses) => {
return cleanData return cleanData
} }
// more kinds: 'Property', 'Class' // more kinds: 'Property', 'Enumeration'
const showKindOfProperty = { const showKindOfProperty = {
Method: { onlyPublic: true }, Method: { onlyPublic: true },
Property: { onlyPublic: true }, Property: { onlyPublic: true }
Class: { onlyPublic: true },
Interface: { onlyPublic: false }
} }
export const filterByKindOfProperty = ({ kindString, flags }) => { export const filterByKindOfProperty = ({ kindString, flags }) => {
const config = showKindOfProperty[kindString] const config = showKindOfProperty[kindString]
if (!config) return if (!config) return
// filter out static methods by default
if (flags.isStatic) return
if (config.onlyPublic && !flags.isPublic) return if (config.onlyPublic && !flags.isPublic) return
return true return true