bool matches(obj, Map matchState)

This does the matching of the actual vs expected values. item is the actual value. matchState can be supplied and may be used to add details about the mismatch that are too costly to determine in describeMismatch.

Source

bool matches(obj, Map matchState) => obj is T;