File tree Expand file tree Collapse file tree 4 files changed +17
-25
lines changed Expand file tree Collapse file tree 4 files changed +17
-25
lines changed Original file line number Diff line number Diff line change @@ -379,17 +379,14 @@ interface List<A> {
379379}
380380
381381let 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+ }))
393390recursiveType .valueBuffer ({
394391 list: {
395392 head: ' 1' ,
Original file line number Diff line number Diff 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<List<< span class ="hljs-built_in "> string</ span > >>(< 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<List<< span class ="hljs-built_in "> string</ span > >>({
436- list: < span class ="hljs-keyword "> new</ span > sb.OptionalType(
437- < span class ="hljs-keyword "> new</ span > sb.StructType<Cons<< span class ="hljs-built_in "> string</ span > >>({
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<List<< span class ="hljs-built_in "> string</ span > >>({
435+ list: < span class ="hljs-keyword "> new</ span > sb.OptionalType(
436+ < span class ="hljs-keyword "> new</ span > sb.StructType<Cons<< span class ="hljs-built_in "> string</ span > >>({
437+ head: < span class ="hljs-keyword "> new</ span > sb.StringType,
438+ tail: recursiveType
439+ })
440+ )
441+ }))
445442recursiveType.valueBuffer({
446443 list: {
447444 head: < span class ="hljs-string "> '1'</ span > ,
Original file line number Diff line number Diff line change @@ -84,7 +84,6 @@ <h1>External module "index"</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 "> "read"</ a > < span class ="tsd-signature-symbol "> = 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 >
Original file line number Diff line number Diff line change 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)
You can’t perform that action at this time.
0 commit comments