-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Jaskeerat Singh Saluja <[email protected]>
- Loading branch information
Jaskeerat Singh Saluja
authored and
Jaskeerat Singh Saluja
committed
Sep 6, 2024
1 parent
4334ac1
commit 782cff8
Showing
1 changed file
with
5 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -90,13 +90,14 @@ class TypescriptVisitor { | |
// as well as all the super types) for all the classes in this model file | ||
parameters.fileWriter.writeLine(0, '\n// imports'); | ||
const aliasedTypesMap = new Map(); | ||
modelFile.imports | ||
.filter(imp => imp.$class === '[email protected]' && imp.aliasedTypes) | ||
.forEach(imp => { | ||
modelFile.imports.forEach((imp) => { | ||
if (imp.$class === '[email protected]' && imp.aliasedTypes) { | ||
imp.aliasedTypes.forEach(type => { | ||
aliasedTypesMap.set(`${imp.namespace}.I${type.name}`, `I${type.aliasedName}`); | ||
}); | ||
}); | ||
} | ||
}); | ||
|
||
const properties = new Map(); | ||
modelFile.getAllDeclarations() | ||
.filter(declaration => !declaration.isScalarDeclaration?.()) | ||
|
@@ -163,7 +164,6 @@ class TypescriptVisitor { | |
} | ||
}); | ||
|
||
|
||
parameters.fileWriter.writeLine(0, '\n// interfaces'); | ||
parameters.aliasedTypesMap = aliasedTypesMap; | ||
modelFile.getAllDeclarations() | ||
|