F
filter
Defines a reusable filter that takes arguments. Its cache key is the build's hash of predicate's source plus the arguments' JSON, so every plugin defining the same filter shares one cache entry.
function filter<A extends FilterArgument[]>(predicate: FilterPredicate<A>): (...args: A) => MetroFilterParameters
| Name | Type | Description |
|---|---|---|
| predicate | FilterPredicate<A> | Tests a module against the arguments; it may read only its parameters and globals. |
Returns
(...args: A) => MetroFilterA function building the MetroFilter for a set of arguments.