Skip to content

Commit

Permalink
fix: ensure that getShortType regex isn't greedy
Browse files Browse the repository at this point in the history
  • Loading branch information
collink committed Aug 1, 2024
1 parent 97719b3 commit 4241657
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/common.mts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export function extractPropertiesFromObjectParam(param: ParameterDeclaration) {
* TODO: Replace with a more robust solution.
*/
export function getShortType(type: string) {
return type.replaceAll(/import\(".*"\)\./g, "");
return type.replaceAll(/import\(".*?"\)\./g, "");
}

export function getClassesFromService(node: SourceFile) {
Expand Down

0 comments on commit 4241657

Please sign in to comment.