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:
parent
dad281d32c
commit
6c998dc6c9
@ -29,18 +29,19 @@ export const cleanTypedocData = (data, useClasses) => {
|
||||
return cleanData
|
||||
}
|
||||
|
||||
// more kinds: 'Property', 'Class'
|
||||
// more kinds: 'Property', 'Enumeration'
|
||||
const showKindOfProperty = {
|
||||
Method: { onlyPublic: true },
|
||||
Property: { onlyPublic: true },
|
||||
Class: { onlyPublic: true },
|
||||
Interface: { onlyPublic: false }
|
||||
Property: { onlyPublic: true }
|
||||
}
|
||||
|
||||
export const filterByKindOfProperty = ({ kindString, flags }) => {
|
||||
const config = showKindOfProperty[kindString]
|
||||
if (!config) return
|
||||
|
||||
// filter out static methods by default
|
||||
if (flags.isStatic) return
|
||||
|
||||
if (config.onlyPublic && !flags.isPublic) return
|
||||
|
||||
return true
|
||||
|
Loading…
Reference in New Issue
Block a user