Skip to content

Commit 1055840

Browse files
committed
Documentation updates
1 parent f9b7468 commit 1055840

File tree

4 files changed

+17
-25
lines changed

4 files changed

+17
-25
lines changed

README.md

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -379,17 +379,14 @@ interface List<A> {
379379
}
380380

381381
let recursiveType = new sb.RecursiveType<List<string>>('linked-list')
382-
sb.registerType({
383-
type: new sb.StructType<List<string>>({
384-
list: new sb.OptionalType(
385-
new sb.StructType<Cons<string>>({
386-
head: new sb.StringType,
387-
tail: recursiveType
388-
})
389-
)
390-
}),
391-
name: 'linked-list'
392-
})
382+
recursiveType.setType(new sb.StructType<List<string>>({
383+
list: new sb.OptionalType(
384+
new sb.StructType<Cons<string>>({
385+
head: new sb.StringType,
386+
tail: recursiveType
387+
})
388+
)
389+
}))
393390
recursiveType.valueBuffer({
394391
list: {
395392
head: '1',

docs/index.html

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -431,17 +431,14 @@ <h2 id="using-with-typescript">Using with TypeScript</h2>
431431
}
432432

433433
<span class="hljs-keyword">let</span> recursiveType = <span class="hljs-keyword">new</span> sb.RecursiveType&lt;List&lt;<span class="hljs-built_in">string</span>&gt;&gt;(<span class="hljs-string">'linked-list'</span>)
434-
sb.registerType({
435-
<span class="hljs-keyword">type</span>: <span class="hljs-keyword">new</span> sb.StructType&lt;List&lt;<span class="hljs-built_in">string</span>&gt;&gt;({
436-
list: <span class="hljs-keyword">new</span> sb.OptionalType(
437-
<span class="hljs-keyword">new</span> sb.StructType&lt;Cons&lt;<span class="hljs-built_in">string</span>&gt;&gt;({
438-
head: <span class="hljs-keyword">new</span> sb.StringType,
439-
tail: recursiveType
440-
})
441-
)
442-
}),
443-
name: <span class="hljs-string">'linked-list'</span>
444-
})
434+
recursiveType.setType(<span class="hljs-keyword">new</span> sb.StructType&lt;List&lt;<span class="hljs-built_in">string</span>&gt;&gt;({
435+
list: <span class="hljs-keyword">new</span> sb.OptionalType(
436+
<span class="hljs-keyword">new</span> sb.StructType&lt;Cons&lt;<span class="hljs-built_in">string</span>&gt;&gt;({
437+
head: <span class="hljs-keyword">new</span> sb.StringType,
438+
tail: recursiveType
439+
})
440+
)
441+
}))
445442
recursiveType.valueBuffer({
446443
list: {
447444
head: <span class="hljs-string">'1'</span>,

docs/modules/_index_.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ <h1>External module &quot;index&quot;</h1>
8484
</li>
8585
<li><strong>From</strong> <code>read</code><ul>
8686
<li><a href="_read_.html#type">type</a> as <code>r.type</code></li>
87-
<li><a href="_read_.html#value">value</a> as <code>r.value</code></li>
8887
</ul>
8988
</li>
9089
<li><strong>From</strong> <code>recursive-registry</code><ul>
@@ -179,7 +178,7 @@ <h3>r</h3>
179178
<div class="tsd-signature tsd-kind-icon">r<span class="tsd-signature-symbol">:</span> <a href="_read_.html" class="tsd-signature-type">&quot;read&quot;</a><span class="tsd-signature-symbol"> =&nbsp;read</span></div>
180179
<aside class="tsd-sources">
181180
<ul>
182-
<li>Defined in index.ts:70</li>
181+
<li>Defined in index.ts:69</li>
183182
</ul>
184183
</aside>
185184
</section>

index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
* - [[httpRespond]]
1212
* - **From** `read`
1313
* - [type](_read_.html#type) as `r.type`
14-
* - [value](_read_.html#value) as `r.value`
1514
* - **From** `recursive-registry`
1615
* - [registerType](_recursive_registry_.html#registertype)
1716
* - [getType](_recursive_registry_.html#gettype)

0 commit comments

Comments
 (0)