PropertyFilter.ts overview
This module implements a type that takes care of filtering properties when printing non-primitive values.
With the make function, you can define your own instances if the provided ones don’t suit your needs.
Exports Grouped by Category
Constructors
make
Constructor of a PPPropertyFilter
Signature
declare const make: (params: MTypes.Data<Type>) => Type
merge
Creates a new PPPropertyFilter by composing several existing PPPropertyFilter’s in sequence. The resulting PPPropertyFilter removes any value that is removed by at least one of the composed PPPropertyFilter’s.
Signature
declare const merge: ({ id, filters }: { readonly id: string; readonly filters: ReadonlyArray<Type> }) => Type
removeNotFulfillingKeyPredicateMaker
Constructor of a PPPropertyFilter instance that removes properties of non-primitive values whose key is:
- A string that does not fulfill
predicate - A symbol
Signature
declare const removeNotFulfillingKeyPredicateMaker: ({
id,
predicate
}: {
readonly id: string
readonly predicate: Predicate.Predicate<string>
}) => Type
Equivalences
equivalence
Equivalence of PPPropertyFilter’s
Signature
declare const equivalence: Equivalence.Equivalence<Type>
Getters
action
Returns the action property of self
Signature
declare const action: MTypes.OneArgFunction<Type, MTypes.OneArgFunction<PPValues.Type, PPValues.Type>>
id
Returns the id property of self
Signature
declare const id: MTypes.OneArgFunction<Type, string>
Instances
none
PPPropertyFilter instance that removes no properties
Signature
declare const none: Type
removeEnumerables
PPPropertyFilter instance that removes enumerable properties of non-primitive values
Signature
declare const removeEnumerables: Type
removeFunctions
PPPropertyFilter instance that removes properties of non-primitive values whose value is a function
Signature
declare const removeFunctions: Type
removeNonEnumerables
PPPropertyFilter instance that removes non-enumerable properties of non-primitive values
Signature
declare const removeNonEnumerables: Type
removeNonFunctions
PPPropertyFilter instance that removes properties of non-primitive values whose value is not a function
Signature
declare const removeNonFunctions: Type
removeStringKeys
PPPropertyFilter instance that removes properties of non-primitive values with a string key
Signature
declare const removeStringKeys: Type
removeSymbolicKeys
PPPropertyFilter instance that removes properties of non-primitive values with a symbolic key
Signature
declare const removeSymbolicKeys: Type
Models
Type (class)
Type that represents a PPPropertyFilter
Signature
declare class Type {
constructor({ id, action }: MTypes.Data<Type>)
}
[MData.idSymbol] (method)
Returns the id of this
Signature
declare const [MData.idSymbol]: () => string | (() => string)
[Hash.symbol] (method)
Calculates the hash value of this
Signature
declare const [Hash.symbol]: () => number
[MEquivalenceBasedEqualityData.isEquivalentToSymbol] (method)
Function that implements the equivalence of this and that
Signature
declare const [MEquivalenceBasedEqualityData.isEquivalentToSymbol]: (this: this, that: this) => boolean
[MEquivalenceBasedEqualityData.hasSameTypeMarkerAsSymbol] (method)
Predicate that returns true if that has the same type marker as this
Signature
declare const [MEquivalenceBasedEqualityData.hasSameTypeMarkerAsSymbol]: (that: unknown) => boolean
id (property)
Id of this PropertyFilter instance. Useful for equality and debugging
Signature
readonly id: string
action (property)
Action of this PropertyFilter instance
Signature
readonly action: MTypes.OneArgFunction<PPValues.Type, PPValues.Type>
Module markers
moduleTag
Module tag
Signature
declare const moduleTag: "@parischap/pretty-print/Parameters/PropertyFilter/"