@@ -116,7 +116,7 @@ export default class MetaRegistry extends MetadataRegistryLookup {
116116 this . typeDefs [ typeIndex - 1 ] = this . typeDefFromMetaType ( this . typeAt ( typeIndex ) , typeIndex ) ;
117117 }
118118
119- private typeDefIdFields ( { id } : MetaType ) : Pick < TypeDef , never > {
119+ private _typeDefIdFields ( { id } : MetaType ) : Pick < TypeDef , never > {
120120 const { 'custom.name' : nameIndex , 'custom.namespace' : namespaceIndices , 'custom.params' : paramsIndices } = id as MetaTypeIdCustom ;
121121
122122 if ( ! nameIndex ) {
@@ -136,33 +136,33 @@ export default class MetaRegistry extends MetadataRegistryLookup {
136136 } ;
137137 }
138138
139- private typeDefDefFields ( metaType : MetaType , typeIndex ?: TypeIndex ) : Pick < TypeDef , never > {
139+ private _typeDefDefFields ( metaType : MetaType , typeIndex ?: TypeIndex ) : Pick < TypeDef , never > {
140140 let typeDef ;
141141
142142 switch ( detectedType ( metaType ) ) {
143143 case MetaTypeInfo . BuiltinPlain :
144- typeDef = this . typeDefForBuiltinPlain ( metaType . id as string ) ;
144+ typeDef = this . _typeDefForBuiltinPlain ( metaType . id as string ) ;
145145 break ;
146146 case MetaTypeInfo . BuiltinTuple :
147- typeDef = this . typeDefForBuiltinTuple ( metaType . id as TypeIndex [ ] ) ;
147+ typeDef = this . _typeDefForBuiltinTuple ( metaType . id as TypeIndex [ ] ) ;
148148 break ;
149149 case MetaTypeInfo . BuiltinVec :
150- typeDef = this . typeDefForBuiltinVec ( metaType . id as MetaTypeIdVec , typeIndex ) ;
150+ typeDef = this . _typeDefForBuiltinVec ( metaType . id as MetaTypeIdVec , typeIndex ) ;
151151 break ;
152152 case MetaTypeInfo . BuiltinVecFixed :
153- typeDef = this . typeDefForBuiltinVecFixed ( metaType . id as MetaTypeIdVecFixed , typeIndex ) ;
153+ typeDef = this . _typeDefForBuiltinVecFixed ( metaType . id as MetaTypeIdVecFixed , typeIndex ) ;
154154 break ;
155155 case MetaTypeInfo . Enum :
156- typeDef = this . typeDefForEnum ( metaType . def as MetaTypeDefEnum , metaType . id as MetaTypeIdCustom , typeIndex ) ;
156+ typeDef = this . _typeDefForEnum ( metaType . def as MetaTypeDefEnum , metaType . id as MetaTypeIdCustom , typeIndex ) ;
157157 break ;
158158 case MetaTypeInfo . ClikeEnum :
159- typeDef = this . typeDefForClikeEnum ( metaType . def as MetaTypeDefClikeEnum ) ;
159+ typeDef = this . _typeDefForClikeEnum ( metaType . def as MetaTypeDefClikeEnum ) ;
160160 break ;
161161 case MetaTypeInfo . Struct :
162162 typeDef = this . typeDefForStruct ( metaType . def as MetaTypeDefStruct ) ;
163163 break ;
164164 case MetaTypeInfo . TupleStruct :
165- typeDef = this . typeDefForTupleStruct ( metaType . def as MetaTypeDefTupleStruct ) ;
165+ typeDef = this . _typeDefForTupleStruct ( metaType . def as MetaTypeDefTupleStruct ) ;
166166 break ;
167167 case MetaTypeInfo . Null :
168168 default :
@@ -176,8 +176,8 @@ export default class MetaRegistry extends MetadataRegistryLookup {
176176 return withTypeString ( {
177177 info : TypeDefInfo . Null ,
178178 type : '' ,
179- ...this . typeDefDefFields ( metaType , typeIndex ) ,
180- ...this . typeDefIdFields ( metaType )
179+ ...this . _typeDefDefFields ( metaType , typeIndex ) ,
180+ ...this . _typeDefIdFields ( metaType )
181181 } ) as TypeDef ;
182182 }
183183
@@ -189,7 +189,7 @@ export default class MetaRegistry extends MetadataRegistryLookup {
189189 return this . typeDefAt ( typeIndex ) ;
190190 }
191191
192- private typeDefForEnumVariant ( variant : MetaTypeDefEnumVariant ) : Pick < TypeDef , any > {
192+ private _typeDefForEnumVariant ( variant : MetaTypeDefEnumVariant ) : Pick < TypeDef , any > {
193193 const { 'unit_variant.name' : unitNameIndex } = variant as MetaTypeDefEnumVariantUnit ;
194194
195195 if ( unitNameIndex ) {
@@ -203,7 +203,7 @@ export default class MetaRegistry extends MetadataRegistryLookup {
203203 const { 'tuple_struct_variant.name' : tupleStructVariantNameIndex } = variant as MetaTypeDefEnumVariantTupleStruct ;
204204
205205 if ( tupleStructVariantNameIndex ) {
206- return this . typeDefForTupleStruct ( variant as MetaTypeDefEnumVariantTupleStruct ) ;
206+ return this . _typeDefForTupleStruct ( variant as MetaTypeDefEnumVariantTupleStruct ) ;
207207 }
208208
209209 const { 'struct_variant.name' : structVariantNameIndex } = variant as MetaTypeDefEnumVariantStruct ;
@@ -218,14 +218,14 @@ export default class MetaRegistry extends MetadataRegistryLookup {
218218 } ;
219219 }
220220
221- private typeDefForBuiltinPlain ( id : string ) : Pick < TypeDef , never > {
221+ private _typeDefForBuiltinPlain ( id : string ) : Pick < TypeDef , never > {
222222 return {
223223 info : TypeDefInfo . Plain ,
224224 type : id
225225 } ;
226226 }
227227
228- private typeDefForBuiltinTuple ( id : TypeIndex [ ] ) : Pick < TypeDef , never > {
228+ private _typeDefForBuiltinTuple ( id : TypeIndex [ ] ) : Pick < TypeDef , never > {
229229 const sub = id . map ( ( tupleTypeIndex : number ) : TypeDef => this . typeDefFromMetaTypeAt ( tupleTypeIndex ) ) ;
230230
231231 return {
@@ -234,7 +234,7 @@ export default class MetaRegistry extends MetadataRegistryLookup {
234234 } ;
235235 }
236236
237- private typeDefForBuiltinVec ( id : MetaTypeIdVec , typeIndex ?: TypeIndex ) : Pick < TypeDef , never > {
237+ private _typeDefForBuiltinVec ( id : MetaTypeIdVec , typeIndex ?: TypeIndex ) : Pick < TypeDef , never > {
238238 const { 'slice.type' : vecTypeIndex } = id ;
239239
240240 assert ( ! typeIndex || vecTypeIndex !== typeIndex , `MetaRegistry: self-referencing registry type at index ${ typeIndex } ` ) ;
@@ -250,7 +250,7 @@ export default class MetaRegistry extends MetadataRegistryLookup {
250250 } ;
251251 }
252252
253- private typeDefForBuiltinVecFixed ( id : MetaTypeIdVecFixed , typeIndex ?: TypeIndex ) : Pick < TypeDef , never > {
253+ private _typeDefForBuiltinVecFixed ( id : MetaTypeIdVecFixed , typeIndex ?: TypeIndex ) : Pick < TypeDef , never > {
254254 const { 'array.len' : vecLength , 'array.type' : vecTypeIndex } = id ;
255255
256256 assert ( ! vecLength || vecLength <= 256 , 'MetaRegistry: Only support for [Type; <length>], where length <= 256' ) ;
@@ -268,7 +268,7 @@ export default class MetaRegistry extends MetadataRegistryLookup {
268268 } ;
269269 }
270270
271- private typeDefForEnum ( def : MetaTypeDefEnum , id : MetaTypeIdCustom , typeIndex ?: TypeIndex ) : Pick < TypeDef , any > {
271+ private _typeDefForEnum ( def : MetaTypeDefEnum , id : MetaTypeIdCustom , typeIndex ?: TypeIndex ) : Pick < TypeDef , any > {
272272 const name = id && this . _stringAt ( id [ 'custom.name' ] ) ;
273273
274274 switch ( name ) {
@@ -279,7 +279,7 @@ export default class MetaRegistry extends MetadataRegistryLookup {
279279 return this . typeDefForResult ( id , typeIndex ) ;
280280
281281 default : {
282- const sub = def [ 'enum.variants' ] . map ( ( variant ) => this . typeDefForEnumVariant ( variant ) ) ;
282+ const sub = def [ 'enum.variants' ] . map ( ( variant ) => this . _typeDefForEnumVariant ( variant ) ) ;
283283
284284 return {
285285 info : TypeDefInfo . Enum ,
@@ -289,7 +289,7 @@ export default class MetaRegistry extends MetadataRegistryLookup {
289289 }
290290 }
291291
292- private typeDefForClikeEnum ( def : MetaTypeDefClikeEnum ) : Pick < TypeDef , never > {
292+ private _typeDefForClikeEnum ( def : MetaTypeDefClikeEnum ) : Pick < TypeDef , never > {
293293 return {
294294 info : TypeDefInfo . Enum ,
295295 sub : def [ 'clike_enum.variants' ] . map ( ( { discriminant, name : nameIndex } ) : TypeDef => ( {
@@ -336,7 +336,7 @@ export default class MetaRegistry extends MetadataRegistryLookup {
336336 } ) ;
337337 }
338338
339- private typeDefForTupleStruct ( def : MetaTypeDefTupleStruct | MetaTypeDefEnumVariantTupleStruct ) : Pick < TypeDef , any > {
339+ private _typeDefForTupleStruct ( def : MetaTypeDefTupleStruct | MetaTypeDefEnumVariantTupleStruct ) : Pick < TypeDef , any > {
340340 const tupleStructTypes = ( def as MetaTypeDefTupleStruct ) [ 'tuple_struct.types' ] || ( def as MetaTypeDefEnumVariantTupleStruct ) [ 'tuple_struct_variant.types' ] ;
341341 const tupleStructNameIndex = ( def as MetaTypeDefEnumVariantTupleStruct ) [ 'tuple_struct_variant.name' ] ;
342342
0 commit comments