@@ -43,6 +43,8 @@ declare module binaryen {
4343
4444 function createType ( types : Type [ ] ) : Type ;
4545 function expandType ( type : Type ) : Type [ ] ;
46+ function getTypeFromHeapType ( heapType : HeapType , nullable : boolean ) : Type ;
47+ function getHeapType ( type : Type ) : HeapType ;
4648
4749 const enum ExpressionIds {
4850 Invalid ,
@@ -1847,6 +1849,29 @@ declare module binaryen {
18471849 copyExpression ( expr : ExpressionRef ) : ExpressionRef ;
18481850 }
18491851
1852+ interface TypeBuilderField {
1853+ type : Type ;
1854+ packedType : Type ;
1855+ mutable : boolean ;
1856+ }
1857+
1858+ class TypeBuilder {
1859+ constructor ( size : number ) ;
1860+ ptr : number ;
1861+ grow ( count : number ) : void ;
1862+ getSize ( ) : number ;
1863+ setSignatureType ( index : number , paramTypes : Type , resultTypes : Type ) : void ;
1864+ setStructType ( index : number , fields ?: TypeBuilderField [ ] ) : void ;
1865+ setArrayType ( index : number , elementType : Type , elementPackedType : Type , elementMutable : boolean ) : void ;
1866+ getTempHeapType ( index : number ) : HeapType ;
1867+ getTempTupleType ( types : Type [ ] ) : Type ;
1868+ getTempRefType ( heapType : HeapType , nullable : boolean ) : Type ;
1869+ setSubType ( index : number , superType : HeapType ) : void ;
1870+ setOpen ( index : number ) : void ;
1871+ createRecGroup ( index : number , length : number ) : void ;
1872+ buildAndDispose ( ) : HeapType [ ] ;
1873+ }
1874+
18501875 interface MemorySegment {
18511876 offset : ExpressionRef ;
18521877 data : Uint8Array ;
@@ -2312,6 +2337,8 @@ declare module binaryen {
23122337 function setAllowInliningFunctionsWithLoops ( on : boolean ) : void ;
23132338 function exit ( status : number ) : void ;
23142339
2340+
2341+
23152342 type RelooperBlockRef = number ;
23162343
23172344 class Relooper {
0 commit comments