@@ -73,8 +73,8 @@ const isEnumItem = (
7373 return "enum" in item . inner ;
7474} ;
7575
76- const removePrefix = ( name : string ) : string => {
77- return name
76+ const removePrefix = ( path : string ) : string => {
77+ return path
7878 . replace ( / ^ ( c r a t e : : ) ? s t o r e s : : / , "" )
7979 . replace ( / ^ s t d : : c o l l e c t i o n s : : / , "" ) ;
8080} ;
@@ -146,8 +146,8 @@ const generateResolvedPathJsonExample = (
146146 crate : Crate ,
147147 depth : number ,
148148) : JsonExample => {
149- const { name , id, args } = type . resolved_path ;
150- const cleanName = removePrefix ( name ) ;
149+ const { path , id, args } = type . resolved_path ;
150+ const cleanName = removePrefix ( path ) ;
151151 switch ( cleanName ) {
152152 case "Option" :
153153 return null ;
@@ -311,7 +311,7 @@ const generateTypeDescription = (type: Type): string => {
311311 }
312312
313313 if ( isResolvedPathType ( type ) ) {
314- const { name , args } = type . resolved_path ;
314+ const { path , args } = type . resolved_path ;
315315
316316 const getInnerType = ( index : number ) : string => {
317317 if ( args && "angle_bracketed" in args ) {
@@ -323,7 +323,7 @@ const generateTypeDescription = (type: Type): string => {
323323 return "Unknown" ;
324324 } ;
325325
326- const finalTypeName = removePrefix ( name . split ( "::" ) . pop ( ) || name ) ;
326+ const finalTypeName = removePrefix ( path . split ( "::" ) . pop ( ) || path ) ;
327327
328328 switch ( finalTypeName ) {
329329 case "Option" :
0 commit comments