src/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsImpl.ts/stripBracketSearchCanceled
function stripBracketSearchCanceled<T>(result: T | null | BracketSearchCanceled): T | null {
	if (result instanceof BracketSearchCanceled) {
		return null;
	}
	return result;
}