function checkTypedArrays( actual, expected ) {
	var entries;
	var match;
	var type;

	match = RE_INSTANCE_ANNOTATION.exec( expected );
	if ( match ) {
		type = match[ 1 ];
		entries = match[ 2 ];
		if ( actual.constructor.name !== type ) {
			return 'Expected instance type <'+type+'>, but observed <'+actual.constructor.name+'>';
		}
		if ( entries ) {
			if ( isComplexTypedArray( actual ) ) {
				actual = reinterpretComplex( actual, 0 );
			} else if ( isBooleanArray( actual ) ) {
				actual = copyArray( actual );
			}
			return compareEntries( actual, parse( entries ) );
		}
		return null;
	}
	return 'Typed arrays should be documented using instance annotation';
}
Checks whether a typed array matches the expected return annotation.

## Notes

-   If the return annotation asserts deep instance equality, check whether it corresponds to the actual value.
-   Otherwise, check whether the return annotation signals the correct type.

@private
@param {*} actual - actual return value
@param {string} expected - return value annotation
@returns {(string|null)} error message or null