The ECHO schema type to match against.
The ECHO schema (e.g., Channel.Channel, Document.Document).
A matcher that returns Option.some(node) if the data matches, Option.none() otherwise.
// Use with whenAny for OR logic
const whenPresentable = GraphNodeMatcher.whenAny(
AppNodeMatcher.whenEchoTypeMatches(Collection.Collection),
AppNodeMatcher.whenEchoTypeMatches(Markdown.Document),
);
// Use with whenNot for exclusion
const whenNotChannel = GraphNodeMatcher.whenNot(
AppNodeMatcher.whenEchoTypeMatches(Channel.Channel),
);
whenEchoType - Use instead when you need the typed entity directly.
Matches a node whose data is an instance of the given ECHO schema type. Returns the node (not the data) to enable composition with whenAll/whenAny/whenNot.
Use this instead of whenEchoType when you need to combine matchers. The difference is what's returned:
whenEchoTypereturns the typed entity (for direct use)whenEchoTypeMatchesreturns the node (for composition)