blob: 640d2779ae22269b0b923c4c9b29032cd73ee1ff [file] [log] [blame]
<!DOCTYPE html>
<html prefix="og: http://ogp.me/ns#" class="default">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1">
<title>Apache Annotator (incubating)</title>
<meta property="og:title" content="Apache Annotator" />
<meta property="og:type" content="website" />
<meta property="og:url" content="https://annotator.apache.org/" />
<meta property="og:image:url" content="https://annotator.apache.org/images/annotator-logo.svg" />
<meta property="og:image:alt" content="Apache Annotator (incubating) logo" />
<link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16.png">
<link rel="manifest" href="/site.webmanifest">
<link rel="mask-icon" href="/images/safari-pinned-tab.svg" color="#5bbad5">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="theme-color" content="#ffffff">
<link rel="alternate" title="DOAP" href="doap.rdf" type="application/rdf+xml" />
<link rel="stylesheet" href="../assets/css/main.css">
<style>
/* Avoid TypeDoc style messing up the page around it. Why oh why did scoped CSS die? */
.ui.container {
padding: unset;
}
</style>
<script async src="../assets/js/search.js" id="search-script"></script>
<script defer src="../assets/js/main.js"></script>
<link rel="stylesheet" href="//semantic-ui.com/dist/semantic.min.css" />
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/prism-themes/themes/prism-vs.css" />
<style>
html {
font-size: 17px;
}
p, pre[class*="language-"] {
margin: .8em 0 1.25em;
}
</style>
</head>
<body>
<div class="ui borderless stackable top attached main menu">
<div class="ui container">
<a class="item" href="/" style="color: rgba(0,0,0,.87);">
<img class="ui small image" src="/images/annotator-logo.svg" alt="Apache Annotator (incubating)" />
</a>
<nav class="right menu">
<a class="item" href="/">Home</a>
<a class="item" href="/demo/"><span class="ui positive button">Demo!</span></a>
<a class="active item" href="/docs/">Documentation</a>
<a class="item" rel="external" href="https://github.com/apache/incubator-annotator">Code&nbsp;<i class="small external icon"></i></a>
<a class="item" rel="external" href="https://github.com/apache/incubator-annotator/issues">Issue tracker&nbsp;<i class="small external icon"></i></a>
</nav>
</div>
</div>
<div class="ui basic segment container">
<nav class="ui secondary stackable pointing menu" style="justify-content: center;">
<span class="item" style="background: #ff08">This documentation is for v0.2 (in development)</span>
<span class="item"></span>
<a href="/docs/" class="item">Overview</a>
<a href="/docs/getting-started/" class="item">Getting Started</a>
<a href="/docs/develop/" class="item">Develop</a>
<a href="/docs/api/" class="active item">API reference</a>
</nav>
<div class="ui basic segment container">
<div class="ui stackable grid">
<div class="eight wide column">
<h1>
API reference
</h1>
</div>
<div class="eight wide column">
<aside>
<style>
#tsd-search {
position: relative;
text-align: right;
}
#tsd-search input {
border: 1px solid grey;
border-radius: 4px;
padding: 0.4em;
}
#tsd-search label,
#tsd-search label::before,
#tsd-search input {
vertical-align: middle;
}
#tsd-search .results {
z-index: 1;
position: absolute;
box-shadow: 0px 20px 20px #00000066;
}
</style>
<div id="tsd-search" data-index="../assets/js/search.json" data-base="..">
<div>
<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
<input id="tsd-search-field" type="text" />
</div>
<ul class="results">
<li class="state loading">Preparing search index...</li>
<li class="state failure">The search index is not available</li>
</ul>
</div>
</aside>
</div>
</div>
<header style="margin: 2em 0;" id="typedoc-title">
<style>
#typedoc-title h1 {
margin-top: 0;
}
</style>
<ul class="tsd-breadcrumb">
<li>
<a href="../index.html">apache-annotator</a>
</li>
<li>
<a href="selector.html">selector</a>
</li>
</ul>
<h1>Module selector</h1>
</header>
<div class="row">
<div class="col-8 col-content">
<section class="tsd-panel tsd-comment">
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>This module provides types and generic functions for handling <a href="https://www.w3.org/TR/2017/REC-annotation-model-20170223/#selectors" class="external">Selector</a>s.</p>
</div>
<p>Annotation tool developers should not need most of the functions contained
in this module, but would instead mainly use the module made for the specific
context (document type) they are dealing with. See <a href="dom.html">dom</a>, currently the
only such module.</p>
</div>
</section>
<section class="tsd-panel-group tsd-index-group">
<h2>Index</h2>
<section class="tsd-panel tsd-index-panel">
<div class="tsd-index-content">
<section class="tsd-index-section ">
<h3>Interfaces</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-interface tsd-parent-kind-module tsd-has-type-parameter"><a href="../interfaces/selector.chunk.html" class="tsd-kind-icon">Chunk</a></li>
<li class="tsd-kind-interface tsd-parent-kind-module tsd-has-type-parameter"><a href="../interfaces/selector.chunkrange.html" class="tsd-kind-icon">Chunk<wbr>Range</a></li>
<li class="tsd-kind-interface tsd-parent-kind-module tsd-has-type-parameter"><a href="../interfaces/selector.chunker.html" class="tsd-kind-icon">Chunker</a></li>
<li class="tsd-kind-interface tsd-parent-kind-module"><a href="../interfaces/selector.cssselector.html" class="tsd-kind-icon">Css<wbr>Selector</a></li>
<li class="tsd-kind-interface tsd-parent-kind-module"><a href="../interfaces/selector.describetextquoteoptions.html" class="tsd-kind-icon">Describe<wbr>Text<wbr>Quote<wbr>Options</a></li>
<li class="tsd-kind-interface tsd-parent-kind-module tsd-has-type-parameter"><a href="../interfaces/selector.matcher.html" class="tsd-kind-icon">Matcher</a></li>
<li class="tsd-kind-interface tsd-parent-kind-module"><a href="../interfaces/selector.rangeselector.html" class="tsd-kind-icon">Range<wbr>Selector</a></li>
<li class="tsd-kind-interface tsd-parent-kind-module"><a href="../interfaces/selector.selector-1.html" class="tsd-kind-icon">Selector</a></li>
<li class="tsd-kind-interface tsd-parent-kind-module"><a href="../interfaces/selector.textpositionselector.html" class="tsd-kind-icon">Text<wbr>Position<wbr>Selector</a></li>
<li class="tsd-kind-interface tsd-parent-kind-module"><a href="../interfaces/selector.textquoteselector.html" class="tsd-kind-icon">Text<wbr>Quote<wbr>Selector</a></li>
</ul>
</section>
<section class="tsd-index-section ">
<h3>Functions</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-function tsd-parent-kind-module"><a href="selector.html#chunkequals" class="tsd-kind-icon">chunk<wbr>Equals</a></li>
<li class="tsd-kind-function tsd-parent-kind-module"><a href="selector.html#chunkrangeequals" class="tsd-kind-icon">chunk<wbr>Range<wbr>Equals</a></li>
<li class="tsd-kind-function tsd-parent-kind-module tsd-has-type-parameter"><a href="selector.html#describetextposition" class="tsd-kind-icon">describe<wbr>Text<wbr>Position</a></li>
<li class="tsd-kind-function tsd-parent-kind-module tsd-has-type-parameter"><a href="selector.html#describetextquote" class="tsd-kind-icon">describe<wbr>Text<wbr>Quote</a></li>
<li class="tsd-kind-function tsd-parent-kind-module tsd-has-type-parameter"><a href="selector.html#makerefinable" class="tsd-kind-icon">make<wbr>Refinable</a></li>
<li class="tsd-kind-function tsd-parent-kind-module"><a href="selector.html#textpositionselectormatcher" class="tsd-kind-icon">text<wbr>Position<wbr>Selector<wbr>Matcher</a></li>
<li class="tsd-kind-function tsd-parent-kind-module"><a href="selector.html#textquoteselectormatcher" class="tsd-kind-icon">text<wbr>Quote<wbr>Selector<wbr>Matcher</a></li>
</ul>
</section>
</div>
</section>
</section>
<section class="tsd-panel-group tsd-member-group ">
<h2>Functions</h2>
<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-module">
<a name="chunkequals" class="tsd-anchor"></a>
<h3>chunk<wbr>Equals</h3>
<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-module">
<li class="tsd-signature tsd-kind-icon">chunk<wbr>Equals<span class="tsd-signature-symbol">(</span>chunk1<span class="tsd-signature-symbol">: </span><a href="../interfaces/selector.chunk.html" class="tsd-signature-type" data-tsd-kind="Interface">Chunk</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span>, chunk2<span class="tsd-signature-symbol">: </span><a href="../interfaces/selector.chunk.html" class="tsd-signature-type" data-tsd-kind="Interface">Chunk</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Test two <a href="../interfaces/selector.chunk.html">Chunk</a>s for equality.</p>
</div>
<p>Equality here means that both represent the same piece of text (i.e. at the
same position) in the file. It compares using the custom <a href="../interfaces/selector.chunk.html#equals">Chunk.equals</a>
method if either chunk defines one, and falls back to checking the objects’
identity (i.e. <code>chunk1 === chunk2</code>).</p>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>chunk1: <a href="../interfaces/selector.chunk.html" class="tsd-signature-type" data-tsd-kind="Interface">Chunk</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span></h5>
</li>
<li>
<h5>chunk2: <a href="../interfaces/selector.chunk.html" class="tsd-signature-type" data-tsd-kind="Interface">Chunk</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-module">
<a name="chunkrangeequals" class="tsd-anchor"></a>
<h3>chunk<wbr>Range<wbr>Equals</h3>
<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-module">
<li class="tsd-signature tsd-kind-icon">chunk<wbr>Range<wbr>Equals<span class="tsd-signature-symbol">(</span>range1<span class="tsd-signature-symbol">: </span><a href="../interfaces/selector.chunkrange.html" class="tsd-signature-type" data-tsd-kind="Interface">ChunkRange</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span>, range2<span class="tsd-signature-symbol">: </span><a href="../interfaces/selector.chunkrange.html" class="tsd-signature-type" data-tsd-kind="Interface">ChunkRange</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Test two <a href="../interfaces/selector.chunkrange.html">ChunkRange</a>s for equality.</p>
</div>
<p>Equality here means equality of each of their four properties (i.e.
<a href="../interfaces/selector.chunkrange.html#startchunk">startChunk</a>, <a href="../interfaces/selector.chunkrange.html#startindex">startIndex</a>,
<a href="../interfaces/selector.chunkrange.html#endchunk">endChunk</a>, and <a href="../interfaces/selector.chunkrange.html#endindex">endIndex</a>).
For the <code>startChunk</code>s and <code>endChunk</code>s, this function uses the custom
<a href="../interfaces/selector.chunk.html#equals">Chunk.equals</a> method if defined.</p>
<p>Note that if the start/end of one range points at the end of a chunk, and the
other to the start of a subsequent chunk, they are not considered equal, even
though semantically they may be representing the same range of characters. To
test for such semantic equivalence, ensure that both inputs are normalised:
typically this means the range is shrunk to its narrowest equivalent, and (if
it is empty) positioned at its first equivalent.</p>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>range1: <a href="../interfaces/selector.chunkrange.html" class="tsd-signature-type" data-tsd-kind="Interface">ChunkRange</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span></h5>
</li>
<li>
<h5>range2: <a href="../interfaces/selector.chunkrange.html" class="tsd-signature-type" data-tsd-kind="Interface">ChunkRange</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-module tsd-has-type-parameter">
<a name="describetextposition" class="tsd-anchor"></a>
<h3>describe<wbr>Text<wbr>Position</h3>
<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-module tsd-has-type-parameter">
<li class="tsd-signature tsd-kind-icon">describe<wbr>Text<wbr>Position&lt;TChunk&gt;<span class="tsd-signature-symbol">(</span>target<span class="tsd-signature-symbol">: </span><a href="../interfaces/selector.chunkrange.html" class="tsd-signature-type" data-tsd-kind="Interface">ChunkRange</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">TChunk</span><span class="tsd-signature-symbol">&gt;</span>, scope<span class="tsd-signature-symbol">: </span><a href="../interfaces/selector.chunker.html" class="tsd-signature-type" data-tsd-kind="Interface">Chunker</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">TChunk</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/selector.textpositionselector.html" class="tsd-signature-type" data-tsd-kind="Interface">TextPositionSelector</a><span class="tsd-signature-symbol">&gt;</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Returns a <a href="../interfaces/selector.textpositionselector.html">TextPositionSelector</a> that points at the target text within
the given scope.</p>
</div>
<p>This is an abstract implementation of the function’s logic, which expects a
generic <a href="../interfaces/selector.chunker.html">Chunker</a> to represent the text, and a <a href="../interfaces/selector.chunkrange.html">ChunkRange</a> to
represent the target.</p>
<p>See <a href="dom.html#describetextposition">dom.describeTextPosition</a> for a wrapper around
this implementation which applies it to the text of an HTML DOM.</p>
</div>
<h4 class="tsd-type-parameters-title">Type parameters</h4>
<ul class="tsd-type-parameters">
<li>
<h4>TChunk<span class="tsd-signature-symbol">: </span><a href="../interfaces/selector.chunk.html" class="tsd-signature-type" data-tsd-kind="Interface">Chunk</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">TChunk</span><span class="tsd-signature-symbol">&gt;</span></h4>
</li>
</ul>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>target: <a href="../interfaces/selector.chunkrange.html" class="tsd-signature-type" data-tsd-kind="Interface">ChunkRange</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">TChunk</span><span class="tsd-signature-symbol">&gt;</span></h5>
<div class="tsd-comment tsd-typography">
<p>The range of characters that the selector should describe</p>
</div>
</li>
<li>
<h5>scope: <a href="../interfaces/selector.chunker.html" class="tsd-signature-type" data-tsd-kind="Interface">Chunker</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">TChunk</span><span class="tsd-signature-symbol">&gt;</span></h5>
<div class="tsd-comment tsd-typography">
<p>The text, presented as a <a href="../interfaces/selector.chunker.html">Chunker</a>, which contains the
target range, and relative to which its position will be measured</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/selector.textpositionselector.html" class="tsd-signature-type" data-tsd-kind="Interface">TextPositionSelector</a><span class="tsd-signature-symbol">&gt;</span></h4>
<p>The <a href="../interfaces/selector.textpositionselector.html">TextPositionSelector</a> that describes <code>target</code> relative
to <code>scope</code></p>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-module tsd-has-type-parameter">
<a name="describetextquote" class="tsd-anchor"></a>
<h3>describe<wbr>Text<wbr>Quote</h3>
<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-module tsd-has-type-parameter">
<li class="tsd-signature tsd-kind-icon">describe<wbr>Text<wbr>Quote&lt;TChunk&gt;<span class="tsd-signature-symbol">(</span>target<span class="tsd-signature-symbol">: </span><a href="../interfaces/selector.chunkrange.html" class="tsd-signature-type" data-tsd-kind="Interface">ChunkRange</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">TChunk</span><span class="tsd-signature-symbol">&gt;</span>, scope<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><a href="../interfaces/selector.chunker.html" class="tsd-signature-type" data-tsd-kind="Interface">Chunker</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">TChunk</span><span class="tsd-signature-symbol">&gt;</span>, options<span class="tsd-signature-symbol">?: </span><a href="../interfaces/selector.describetextquoteoptions.html" class="tsd-signature-type" data-tsd-kind="Interface">DescribeTextQuoteOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/selector.textquoteselector.html" class="tsd-signature-type" data-tsd-kind="Interface">TextQuoteSelector</a><span class="tsd-signature-symbol">&gt;</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Returns a <a href="../interfaces/selector.textquoteselector.html">TextQuoteSelector</a> that points at the target quote in the
given text.</p>
</div>
<p>The selector will contain the exact target quote. In case this quote appears
multiple times in the text, sufficient context around the quote will be
included in the selector’s <code>prefix</code> and <code>suffix</code> attributes to disambiguate.
By default, more prefix and suffix are included than strictly required; both
in order to be robust against slight modifications, and in an attempt to not
end halfway a word (mainly for human readability).</p>
<p>This is an abstract implementation of the function’s logic, which expects a
generic <a href="../interfaces/selector.chunker.html">Chunker</a> to represent the text, and a <a href="../interfaces/selector.chunkrange.html">ChunkRange</a> to
represent the target.</p>
<p>See <a href="dom.html#describetextquote">dom.describeTextQuote</a> for a wrapper around this
implementation which applies it to the text of an HTML DOM.</p>
</div>
<h4 class="tsd-type-parameters-title">Type parameters</h4>
<ul class="tsd-type-parameters">
<li>
<h4>TChunk<span class="tsd-signature-symbol">: </span><a href="../interfaces/selector.chunk.html" class="tsd-signature-type" data-tsd-kind="Interface">Chunk</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">TChunk</span><span class="tsd-signature-symbol">&gt;</span></h4>
</li>
</ul>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>target: <a href="../interfaces/selector.chunkrange.html" class="tsd-signature-type" data-tsd-kind="Interface">ChunkRange</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">TChunk</span><span class="tsd-signature-symbol">&gt;</span></h5>
<div class="tsd-comment tsd-typography">
<p>The range of characters that the selector should describe</p>
</div>
</li>
<li>
<h5>scope: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><a href="../interfaces/selector.chunker.html" class="tsd-signature-type" data-tsd-kind="Interface">Chunker</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">TChunk</span><span class="tsd-signature-symbol">&gt;</span></h5>
<div class="tsd-comment tsd-typography">
<p>The text containing the target range; or, more accurately, a
function that produces <a href="../interfaces/selector.chunker.html">Chunker</a>s corresponding to this text.</p>
</div>
<ul class="tsd-parameters">
<li class="tsd-parameter-signature">
<ul class="tsd-signatures tsd-kind-type-literal">
<li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../interfaces/selector.chunker.html" class="tsd-signature-type" data-tsd-kind="Interface">Chunker</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">TChunk</span><span class="tsd-signature-symbol">&gt;</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<h4 class="tsd-returns-title">Returns <a href="../interfaces/selector.chunker.html" class="tsd-signature-type" data-tsd-kind="Interface">Chunker</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">TChunk</span><span class="tsd-signature-symbol">&gt;</span></h4>
</li>
</ul>
</li>
</ul>
</li>
<li>
<h5><span class="tsd-flag ts-flagOptional">Optional</span> options: <a href="../interfaces/selector.describetextquoteoptions.html" class="tsd-signature-type" data-tsd-kind="Interface">DescribeTextQuoteOptions</a></h5>
<div class="tsd-comment tsd-typography">
<p>Options to fine-tune the function’s behaviour.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/selector.textquoteselector.html" class="tsd-signature-type" data-tsd-kind="Interface">TextQuoteSelector</a><span class="tsd-signature-symbol">&gt;</span></h4>
<p>The <a href="../interfaces/selector.textquoteselector.html">TextQuoteSelector</a> that describes <code>target</code>.</p>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-module tsd-has-type-parameter">
<a name="makerefinable" class="tsd-anchor"></a>
<h3>make<wbr>Refinable</h3>
<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-module tsd-has-type-parameter">
<li class="tsd-signature tsd-kind-icon">make<wbr>Refinable&lt;TSelector, TScope, TMatch&gt;<span class="tsd-signature-symbol">(</span>matcherCreator<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>selector<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">TSelector</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><a href="../interfaces/selector.matcher.html" class="tsd-signature-type" data-tsd-kind="Interface">Matcher</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">TScope</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">TMatch</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>selector<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">TSelector</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><a href="../interfaces/selector.matcher.html" class="tsd-signature-type" data-tsd-kind="Interface">Matcher</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">TScope</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">TMatch</span><span class="tsd-signature-symbol">&gt;</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Wrap a matcher creation function so that it supports refinement of selection.</p>
</div>
<p>See <a href="https://www.w3.org/TR/2017/REC-annotation-model-20170223/#refinement-of-selection" class="external">§4.2.9 Refinement of Selection</a> in the Web Annotation Data Model.</p>
</div>
<h4 class="tsd-type-parameters-title">Type parameters</h4>
<ul class="tsd-type-parameters">
<li>
<h4>TSelector<span class="tsd-signature-symbol">: </span><a href="../interfaces/selector.selector-1.html" class="tsd-signature-type" data-tsd-kind="Interface">Selector</a><span class="tsd-signature-symbol"> &amp; </span><span class="tsd-signature-symbol">{ </span>refinedBy<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">TSelector</span><span class="tsd-signature-symbol"> }</span></h4>
</li>
<li>
<h4>TScope</h4>
</li>
<li>
<h4>TMatch</h4>
</li>
</ul>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>matcherCreator: <span class="tsd-signature-symbol">(</span>selector<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">TSelector</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><a href="../interfaces/selector.matcher.html" class="tsd-signature-type" data-tsd-kind="Interface">Matcher</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">TScope</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">TMatch</span><span class="tsd-signature-symbol">&gt;</span></h5>
<div class="tsd-comment tsd-typography">
<p>The function to wrap; it will be executed both for
<a href="../interfaces/selector.selector-1.html">Selector</a>s passed to the returned wrapper function, and for any
refining Selector those might contain (and any refinement of that, etc.).</p>
</div>
<ul class="tsd-parameters">
<li class="tsd-parameter-signature">
<ul class="tsd-signatures tsd-kind-type-literal">
<li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>selector<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">TSelector</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../interfaces/selector.matcher.html" class="tsd-signature-type" data-tsd-kind="Interface">Matcher</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">TScope</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">TMatch</span><span class="tsd-signature-symbol">&gt;</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>selector: <span class="tsd-signature-type">TSelector</span></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <a href="../interfaces/selector.matcher.html" class="tsd-signature-type" data-tsd-kind="Interface">Matcher</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">TScope</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">TMatch</span><span class="tsd-signature-symbol">&gt;</span></h4>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-symbol">(</span>selector<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">TSelector</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><a href="../interfaces/selector.matcher.html" class="tsd-signature-type" data-tsd-kind="Interface">Matcher</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">TScope</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">TMatch</span><span class="tsd-signature-symbol">&gt;</span></h4>
<ul class="tsd-parameters">
<li class="tsd-parameter-signature">
<ul class="tsd-signatures tsd-kind-type-literal">
<li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>selector<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">TSelector</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../interfaces/selector.matcher.html" class="tsd-signature-type" data-tsd-kind="Interface">Matcher</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">TScope</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">TMatch</span><span class="tsd-signature-symbol">&gt;</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>selector: <span class="tsd-signature-type">TSelector</span></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <a href="../interfaces/selector.matcher.html" class="tsd-signature-type" data-tsd-kind="Interface">Matcher</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">TScope</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">TMatch</span><span class="tsd-signature-symbol">&gt;</span></h4>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-module">
<a name="textpositionselectormatcher" class="tsd-anchor"></a>
<h3>text<wbr>Position<wbr>Selector<wbr>Matcher</h3>
<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-module">
<li class="tsd-signature tsd-kind-icon">text<wbr>Position<wbr>Selector<wbr>Matcher<span class="tsd-signature-symbol">(</span>selector<span class="tsd-signature-symbol">: </span><a href="../interfaces/selector.textpositionselector.html" class="tsd-signature-type" data-tsd-kind="Interface">TextPositionSelector</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span>&lt;TChunk&gt;<span class="tsd-signature-symbol">(</span>scope<span class="tsd-signature-symbol">: </span><a href="../interfaces/selector.chunker.html" class="tsd-signature-type" data-tsd-kind="Interface">Chunker</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">TChunk</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">AsyncGenerator</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/selector.chunkrange.html" class="tsd-signature-type" data-tsd-kind="Interface">ChunkRange</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">TChunk</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Find the range of text corresponding to the given <a href="../interfaces/selector.textpositionselector.html">TextPositionSelector</a>.</p>
</div>
<p>This is an abstract implementation of the function’s logic, which expects a
generic <a href="../interfaces/selector.chunker.html">Chunker</a> to represent the text, and returns an (async)
generator producing a single <a href="../interfaces/selector.chunkrange.html">ChunkRange</a> to represent the match.
(unlike e.g. TextQuoteSelector, it cannot result in multiple matches).</p>
<p>See <a href="dom.html#createtextpositionselectormatcher">dom.createTextPositionSelectorMatcher</a> for a
wrapper around this implementation which applies it to the text of an HTML
DOM.</p>
<p>The function is curried, taking first the selector and then the text.</p>
<dl class="tsd-comment-tags">
<dt>example</dt>
<dd><pre><code><span style="color: #0000FF">const</span><span style="color: #000000"> </span><span style="color: #0070C1">selector</span><span style="color: #000000"> = { </span><span style="color: #001080">type:</span><span style="color: #000000"> </span><span style="color: #A31515">&#039;TextPositionSelector&#039;</span><span style="color: #000000">, </span><span style="color: #001080">start:</span><span style="color: #000000"> </span><span style="color: #098658">702</span><span style="color: #000000">, </span><span style="color: #001080">end:</span><span style="color: #000000"> </span><span style="color: #098658">736</span><span style="color: #000000"> };</span>
<span style="color: #0000FF">const</span><span style="color: #000000"> </span><span style="color: #0070C1">matches</span><span style="color: #000000"> = </span><span style="color: #795E26">textPositionSelectorMatcher</span><span style="color: #000000">(</span><span style="color: #001080">selector</span><span style="color: #000000">)(</span><span style="color: #001080">textChunks</span><span style="color: #000000">);</span>
<span style="color: #0000FF">const</span><span style="color: #000000"> </span><span style="color: #0070C1">match</span><span style="color: #000000"> = (</span><span style="color: #AF00DB">await</span><span style="color: #000000"> </span><span style="color: #001080">matches</span><span style="color: #000000">.</span><span style="color: #795E26">next</span><span style="color: #000000">()).</span><span style="color: #001080">value</span><span style="color: #000000">;</span>
<span style="color: #001080">console</span><span style="color: #000000">.</span><span style="color: #795E26">log</span><span style="color: #000000">(</span><span style="color: #001080">match</span><span style="color: #000000">);</span>
<span style="color: #008000">// ⇒ { startChunk: { … }, startIndex: 64, endChunk: { … }, endIndex: 98 }</span>
</code></pre>
</dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>selector: <a href="../interfaces/selector.textpositionselector.html" class="tsd-signature-type" data-tsd-kind="Interface">TextPositionSelector</a></h5>
<div class="tsd-comment tsd-typography">
<p>the <a href="../interfaces/selector.textpositionselector.html">TextPositionSelector</a> to be anchored</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns &lt;TChunk&gt;<span class="tsd-signature-symbol">(</span>scope<span class="tsd-signature-symbol">: </span><a href="../interfaces/selector.chunker.html" class="tsd-signature-type" data-tsd-kind="Interface">Chunker</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">TChunk</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">AsyncGenerator</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/selector.chunkrange.html" class="tsd-signature-type" data-tsd-kind="Interface">ChunkRange</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">TChunk</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4>
<p>a <a href="../interfaces/selector.matcher.html">Matcher</a> function that applies <code>selector</code> to a given text</p>
<ul class="tsd-parameters">
<li class="tsd-parameter-signature">
<ul class="tsd-signatures tsd-kind-type-literal tsd-has-type-parameter">
<li class="tsd-signature tsd-kind-icon">&lt;TChunk&gt;<span class="tsd-signature-symbol">(</span>scope<span class="tsd-signature-symbol">: </span><a href="../interfaces/selector.chunker.html" class="tsd-signature-type" data-tsd-kind="Interface">Chunker</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">TChunk</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">AsyncGenerator</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/selector.chunkrange.html" class="tsd-signature-type" data-tsd-kind="Interface">ChunkRange</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">TChunk</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<h4 class="tsd-type-parameters-title">Type parameters</h4>
<ul class="tsd-type-parameters">
<li>
<h4>TChunk<span class="tsd-signature-symbol">: </span><a href="../interfaces/selector.chunk.html" class="tsd-signature-type" data-tsd-kind="Interface">Chunk</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span></h4>
</li>
</ul>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>scope: <a href="../interfaces/selector.chunker.html" class="tsd-signature-type" data-tsd-kind="Interface">Chunker</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">TChunk</span><span class="tsd-signature-symbol">&gt;</span></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">AsyncGenerator</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/selector.chunkrange.html" class="tsd-signature-type" data-tsd-kind="Interface">ChunkRange</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">TChunk</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-module">
<a name="textquoteselectormatcher" class="tsd-anchor"></a>
<h3>text<wbr>Quote<wbr>Selector<wbr>Matcher</h3>
<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-module">
<li class="tsd-signature tsd-kind-icon">text<wbr>Quote<wbr>Selector<wbr>Matcher<span class="tsd-signature-symbol">(</span>selector<span class="tsd-signature-symbol">: </span><a href="../interfaces/selector.textquoteselector.html" class="tsd-signature-type" data-tsd-kind="Interface">TextQuoteSelector</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span>&lt;TChunk&gt;<span class="tsd-signature-symbol">(</span>scope<span class="tsd-signature-symbol">: </span><a href="../interfaces/selector.chunker.html" class="tsd-signature-type" data-tsd-kind="Interface">Chunker</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">TChunk</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">AsyncGenerator</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/selector.chunkrange.html" class="tsd-signature-type" data-tsd-kind="Interface">ChunkRange</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">TChunk</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Find occurrences in a text matching the given <a href="../interfaces/selector.textquoteselector.html">TextQuoteSelector</a>.</p>
</div>
<p>This performs an exact search the selector’s quote (including prefix and
suffix) within the given text.</p>
<p>Note the match is based on strict character-by-character equivalence, i.e.
it is sensitive to whitespace, capitalisation, etc.</p>
<p>This is an abstract implementation of the function’s logic, which expects a
generic <a href="../interfaces/selector.chunker.html">Chunker</a> to represent the text, and returns an (async)
generator of <a href="../interfaces/selector.chunkrange.html">ChunkRange</a>s to represent the matches.</p>
<p>See <a href="dom.html#createtextquoteselectormatcher">dom.createTextQuoteSelectorMatcher</a> for a
wrapper around this implementation which applies it to the text of an HTML
DOM.</p>
<p>The function is curried, taking first the selector and then the text.</p>
<p>As there may be multiple matches for a given selector (when its prefix and
suffix attributes are not sufficient to disambiguate it), the matcher will
return an (async) generator that produces each match in the order they are
found in the text.</p>
<dl class="tsd-comment-tags">
<dt>example</dt>
<dd><pre><code><span style="color: #0000FF">const</span><span style="color: #000000"> </span><span style="color: #0070C1">selector</span><span style="color: #000000"> = { </span><span style="color: #001080">type:</span><span style="color: #000000"> </span><span style="color: #A31515">&#039;TextQuoteSelector&#039;</span><span style="color: #000000">, </span><span style="color: #001080">exact:</span><span style="color: #000000"> </span><span style="color: #A31515">&#039;banana&#039;</span><span style="color: #000000"> };</span>
<span style="color: #0000FF">const</span><span style="color: #000000"> </span><span style="color: #0070C1">matches</span><span style="color: #000000"> = </span><span style="color: #795E26">textQuoteSelectorMatcher</span><span style="color: #000000">(</span><span style="color: #001080">selector</span><span style="color: #000000">)(</span><span style="color: #001080">textChunks</span><span style="color: #000000">);</span>
<span style="color: #AF00DB">for</span><span style="color: #000000"> </span><span style="color: #AF00DB">await</span><span style="color: #000000"> (</span><span style="color: #001080">match</span><span style="color: #000000"> </span><span style="color: #0000FF">of</span><span style="color: #000000"> </span><span style="color: #001080">matches</span><span style="color: #000000">) </span><span style="color: #001080">console</span><span style="color: #000000">.</span><span style="color: #795E26">log</span><span style="color: #000000">(</span><span style="color: #001080">match</span><span style="color: #000000">);</span>
<span style="color: #008000">// ⇒ { startChunk: { … }, startIndex: 187, endChunk: { … }, endIndex: 193 }</span>
<span style="color: #008000">// ⇒ { startChunk: { … }, startIndex: 631, endChunk: { … }, endIndex: 637 }</span>
</code></pre>
</dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>selector: <a href="../interfaces/selector.textquoteselector.html" class="tsd-signature-type" data-tsd-kind="Interface">TextQuoteSelector</a></h5>
<div class="tsd-comment tsd-typography">
<p>The <a href="../interfaces/selector.textquoteselector.html">TextQuoteSelector</a> to be anchored</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns &lt;TChunk&gt;<span class="tsd-signature-symbol">(</span>scope<span class="tsd-signature-symbol">: </span><a href="../interfaces/selector.chunker.html" class="tsd-signature-type" data-tsd-kind="Interface">Chunker</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">TChunk</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">AsyncGenerator</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/selector.chunkrange.html" class="tsd-signature-type" data-tsd-kind="Interface">ChunkRange</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">TChunk</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4>
<p>a <a href="../interfaces/selector.matcher.html">Matcher</a> function that applies <code>selector</code> to a given text</p>
<ul class="tsd-parameters">
<li class="tsd-parameter-signature">
<ul class="tsd-signatures tsd-kind-type-literal tsd-has-type-parameter">
<li class="tsd-signature tsd-kind-icon">&lt;TChunk&gt;<span class="tsd-signature-symbol">(</span>scope<span class="tsd-signature-symbol">: </span><a href="../interfaces/selector.chunker.html" class="tsd-signature-type" data-tsd-kind="Interface">Chunker</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">TChunk</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">AsyncGenerator</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/selector.chunkrange.html" class="tsd-signature-type" data-tsd-kind="Interface">ChunkRange</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">TChunk</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<h4 class="tsd-type-parameters-title">Type parameters</h4>
<ul class="tsd-type-parameters">
<li>
<h4>TChunk<span class="tsd-signature-symbol">: </span><a href="../interfaces/selector.chunk.html" class="tsd-signature-type" data-tsd-kind="Interface">Chunk</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span></h4>
</li>
</ul>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>scope: <a href="../interfaces/selector.chunker.html" class="tsd-signature-type" data-tsd-kind="Interface">Chunker</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">TChunk</span><span class="tsd-signature-symbol">&gt;</span></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">AsyncGenerator</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/selector.chunkrange.html" class="tsd-signature-type" data-tsd-kind="Interface">ChunkRange</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">TChunk</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</section>
</section>
</div>
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
<nav class="tsd-navigation primary">
<ul>
<li class=" ">
<a href="../index.html">Exports</a>
</li>
<li class=" tsd-kind-module">
<a href="dom.html">dom</a>
</li>
<li class="current tsd-kind-module">
<a href="selector.html">selector</a>
</li>
</ul>
</nav>
<nav class="tsd-navigation secondary menu-sticky">
<ul class="before-current">
<li class=" tsd-kind-interface tsd-parent-kind-module tsd-has-type-parameter">
<a href="../interfaces/selector.chunk.html" class="tsd-kind-icon">Chunk</a>
</li>
<li class=" tsd-kind-interface tsd-parent-kind-module tsd-has-type-parameter">
<a href="../interfaces/selector.chunkrange.html" class="tsd-kind-icon">Chunk<wbr>Range</a>
</li>
<li class=" tsd-kind-interface tsd-parent-kind-module tsd-has-type-parameter">
<a href="../interfaces/selector.chunker.html" class="tsd-kind-icon">Chunker</a>
</li>
<li class=" tsd-kind-interface tsd-parent-kind-module">
<a href="../interfaces/selector.cssselector.html" class="tsd-kind-icon">Css<wbr>Selector</a>
</li>
<li class=" tsd-kind-interface tsd-parent-kind-module">
<a href="../interfaces/selector.describetextquoteoptions.html" class="tsd-kind-icon">Describe<wbr>Text<wbr>Quote<wbr>Options</a>
</li>
<li class=" tsd-kind-interface tsd-parent-kind-module tsd-has-type-parameter">
<a href="../interfaces/selector.matcher.html" class="tsd-kind-icon">Matcher</a>
</li>
<li class=" tsd-kind-interface tsd-parent-kind-module">
<a href="../interfaces/selector.rangeselector.html" class="tsd-kind-icon">Range<wbr>Selector</a>
</li>
<li class=" tsd-kind-interface tsd-parent-kind-module">
<a href="../interfaces/selector.selector-1.html" class="tsd-kind-icon">Selector</a>
</li>
<li class=" tsd-kind-interface tsd-parent-kind-module">
<a href="../interfaces/selector.textpositionselector.html" class="tsd-kind-icon">Text<wbr>Position<wbr>Selector</a>
</li>
<li class=" tsd-kind-interface tsd-parent-kind-module">
<a href="../interfaces/selector.textquoteselector.html" class="tsd-kind-icon">Text<wbr>Quote<wbr>Selector</a>
</li>
<li class=" tsd-kind-function tsd-parent-kind-module">
<a href="selector.html#chunkequals" class="tsd-kind-icon">chunk<wbr>Equals</a>
</li>
<li class=" tsd-kind-function tsd-parent-kind-module">
<a href="selector.html#chunkrangeequals" class="tsd-kind-icon">chunk<wbr>Range<wbr>Equals</a>
</li>
<li class=" tsd-kind-function tsd-parent-kind-module tsd-has-type-parameter">
<a href="selector.html#describetextposition" class="tsd-kind-icon">describe<wbr>Text<wbr>Position</a>
</li>
<li class=" tsd-kind-function tsd-parent-kind-module tsd-has-type-parameter">
<a href="selector.html#describetextquote" class="tsd-kind-icon">describe<wbr>Text<wbr>Quote</a>
</li>
<li class=" tsd-kind-function tsd-parent-kind-module tsd-has-type-parameter">
<a href="selector.html#makerefinable" class="tsd-kind-icon">make<wbr>Refinable</a>
</li>
<li class=" tsd-kind-function tsd-parent-kind-module">
<a href="selector.html#textpositionselectormatcher" class="tsd-kind-icon">text<wbr>Position<wbr>Selector<wbr>Matcher</a>
</li>
<li class=" tsd-kind-function tsd-parent-kind-module">
<a href="selector.html#textquoteselectormatcher" class="tsd-kind-icon">text<wbr>Quote<wbr>Selector<wbr>Matcher</a>
</li>
</ul>
</nav>
</div>
</div>
</div>
</div>
<footer class="ui bottom attached segment">
<div class="ui container">
<div class="ui equal height divided stackable grid">
<div class="four wide column">
<a class="ui left floated medium image" href="https://apache.org/" target="_blank">
<img src="https://incubator.apache.org/images/incubator_feather_egg_logo_sm.png" alt="logo of the Apache Incubator" />
</a>
<p>
<em>Copyright © 2016-2018 The Apache Software Foundation, Licensed under
the <a href="https://www.apache.org/licenses/LICENSE-2.0" rel="license external">Apache License, Version 2.0</a>.
|
<a rel="external" href="https://www.apache.org/foundation/policies/privacy">Privacy Policy</a>
</em>
</p>
</div>
<div class="nine wide column">
<p>
<em>Apache Annotator is an effort undergoing incubation at <a target="_blank" href="https://apache.org/">The Apache Software Foundation (ASF)</a> sponsored by the Apache Incubator PMC. Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF.</em></p>
<p><em>Apache®, the names of Apache projects, and the feather logo are either <a rel="external" href="https://www.apache.org/foundation/marks/list/">registered trademarks or trademarks</a> of the Apache Software Foundation in the United States and/or other countries.</em></p>
</div>
<div class="three wide column">
<h4 class="header">The <abbr title="Apache Software Foundation">ASF</abbr></h4>
<div class="ui link list">
<a class="item" rel="external" href="https://incubator.apache.org/">Apache Incubator</a>
<a class="item" rel="external" href="https://www.apache.org/">About the ASF</a>
<a class="item" rel="external" href="https://www.apache.org/events/current-event">Events</a>
<a class="item" rel="external" href="https://www.apache.org/foundation/thanks.html">Thanks</a>
<a class="item" rel="external" href="https://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a>
<a class="item" rel="external" href="https://www.apache.org/security/">Security</a>
<a class="item" rel="external" href="https://www.apache.org/licenses/">License</a>
</div>
</div>
</div>
</div>
</footer>
</body>
</html>