Skip to content

Commit

Permalink
Documentation updates
Browse files Browse the repository at this point in the history
  • Loading branch information
calebsander committed Dec 24, 2017
1 parent f9b7468 commit 1055840
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 25 deletions.
19 changes: 8 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -379,17 +379,14 @@ interface List<A> {
}

let recursiveType = new sb.RecursiveType<List<string>>('linked-list')
sb.registerType({
type: new sb.StructType<List<string>>({
list: new sb.OptionalType(
new sb.StructType<Cons<string>>({
head: new sb.StringType,
tail: recursiveType
})
)
}),
name: 'linked-list'
})
recursiveType.setType(new sb.StructType<List<string>>({
list: new sb.OptionalType(
new sb.StructType<Cons<string>>({
head: new sb.StringType,
tail: recursiveType
})
)
}))
recursiveType.valueBuffer({
list: {
head: '1',
Expand Down
19 changes: 8 additions & 11 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -431,17 +431,14 @@ <h2 id="using-with-typescript">Using with TypeScript</h2>
}

<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>)
sb.registerType({
<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;({
list: <span class="hljs-keyword">new</span> sb.OptionalType(
<span class="hljs-keyword">new</span> sb.StructType&lt;Cons&lt;<span class="hljs-built_in">string</span>&gt;&gt;({
head: <span class="hljs-keyword">new</span> sb.StringType,
tail: recursiveType
})
)
}),
name: <span class="hljs-string">'linked-list'</span>
})
recursiveType.setType(<span class="hljs-keyword">new</span> sb.StructType&lt;List&lt;<span class="hljs-built_in">string</span>&gt;&gt;({
list: <span class="hljs-keyword">new</span> sb.OptionalType(
<span class="hljs-keyword">new</span> sb.StructType&lt;Cons&lt;<span class="hljs-built_in">string</span>&gt;&gt;({
head: <span class="hljs-keyword">new</span> sb.StringType,
tail: recursiveType
})
)
}))
recursiveType.valueBuffer({
list: {
head: <span class="hljs-string">'1'</span>,
Expand Down
3 changes: 1 addition & 2 deletions docs/modules/_index_.html
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ <h1>External module &quot;index&quot;</h1>
</li>
<li><strong>From</strong> <code>read</code><ul>
<li><a href="_read_.html#type">type</a> as <code>r.type</code></li>
<li><a href="_read_.html#value">value</a> as <code>r.value</code></li>
</ul>
</li>
<li><strong>From</strong> <code>recursive-registry</code><ul>
Expand Down Expand Up @@ -179,7 +178,7 @@ <h3>r</h3>
<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>
<aside class="tsd-sources">
<ul>
<li>Defined in index.ts:70</li>
<li>Defined in index.ts:69</li>
</ul>
</aside>
</section>
Expand Down
1 change: 0 additions & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
* - [[httpRespond]]
* - **From** `read`
* - [type](_read_.html#type) as `r.type`
* - [value](_read_.html#value) as `r.value`
* - **From** `recursive-registry`
* - [registerType](_recursive_registry_.html#registertype)
* - [getType](_recursive_registry_.html#gettype)
Expand Down

0 comments on commit 1055840

Please sign in to comment.