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
|
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
|
||||||
|
Loading…
Reference in New Issue
Block a user