Skip to content

Commit 9560079

Browse files
fix: do not prefix promise inner types (#227)
1 parent 9a6239e commit 9560079

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/utils.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,6 @@ export const wrapComment = (comment: string, additionalTags: DocumentationTag[]
8282
return result.concat(' */');
8383
};
8484

85-
const prefixTypeForSafety = (type: string) => {
86-
if (type !== 'Object' && typeof type === 'string' && !isPrimitive(type) && !isBuiltIn(type)) {
87-
return `Electron.${type}`;
88-
}
89-
return type;
90-
};
91-
9285
export const typify = (
9386
type: TypeInformation | TypeInformation[],
9487
maybeInnerReturnTypeName?: string,
@@ -205,7 +198,7 @@ export const typify = (
205198
return '(() => void)';
206199
case 'promise':
207200
if (innerTypes) {
208-
return `Promise<${prefixTypeForSafety(typify(innerTypes[0]))}>`;
201+
return `Promise<${typify(innerTypes[0])}>`;
209202
}
210203
throw new Error('Promise with missing inner type');
211204
case 'record':

0 commit comments

Comments
 (0)