Skip to content

Commit 56c6eca

Browse files
cursoragentbcherny
andcommitted
Fix type annotations in utils.ts and remove unnecessary type assertion
Co-authored-by: boris <[email protected]>
1 parent eb1485c commit 56c6eca

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ export function stripExtension(filename: string): string {
182182
* Convert a string that might contain spaces or special characters to one that
183183
* can safely be used as a TypeScript interface or enum name.
184184
*/
185-
export function toSafeString(string: string) {
185+
export function toSafeString(string: string): string {
186186
// identifiers in javaScript/ts:
187187
// First character: a-zA-Z | _ | $
188188
// Rest: a-zA-Z | _ | $ | 0-9
@@ -219,7 +219,7 @@ export function generateName(from: string, usedNames: Set<string>): string {
219219
nameWithCounter = `${name}${counter}`
220220
counter++
221221
}
222-
name = nameWithCounter as any
222+
name = nameWithCounter
223223
}
224224

225225
usedNames.add(name)

0 commit comments

Comments
 (0)