@@ -25,7 +25,7 @@ const generatePath = (entryPoint: string, currentPoint: string, referencePath: s
2525 } ;
2626} ;
2727
28- const calculateReferencePath = ( store : Walker . Store , base : string , pathArray : string [ ] ) : ToTypeNode . ResolveReferencePath => {
28+ const calculateReferencePath = ( store : Walker . Store , base : string , pathArray : string [ ] , converterContext : ConverterContext . Types , ) : ToTypeNode . ResolveReferencePath => {
2929 let names : string [ ] = [ ] ;
3030 let unresolvedPaths : string [ ] = [ ] ;
3131 pathArray . reduce ( ( previous , lastPath , index ) => {
@@ -67,8 +67,8 @@ const calculateReferencePath = (store: Walker.Store, base: string, pathArray: st
6767 throw new DevelopmentError ( "Local Reference Error \n" + JSON . stringify ( { pathArray, names, base } , null , 2 ) ) ;
6868 }
6969 return {
70- name : names . join ( "." ) ,
71- maybeResolvedName : names . concat ( unresolvedPaths ) . join ( "." ) ,
70+ name : names . map ( converterContext . escapeDeclarationText ) . join ( "." ) ,
71+ maybeResolvedName : names . concat ( unresolvedPaths ) . map ( converterContext . escapeDeclarationText ) . join ( "." ) ,
7272 unresolvedPaths,
7373 } ;
7474} ;
@@ -81,7 +81,7 @@ export const create = (
8181) : ToTypeNode . Context => {
8282 const resolveReferencePath : ToTypeNode . Context [ "resolveReferencePath" ] = ( currentPoint , referencePath ) => {
8383 const { pathArray, base } = generatePath ( entryPoint , currentPoint , referencePath ) ;
84- return calculateReferencePath ( store , base , pathArray ) ;
84+ return calculateReferencePath ( store , base , pathArray , converterContext ) ;
8585 } ;
8686 const setReferenceHandler : ToTypeNode . Context [ "setReferenceHandler" ] = ( currentPoint , reference ) => {
8787 if ( store . hasStatement ( reference . path , [ "interface" , "typeAlias" ] ) ) {
0 commit comments