1

I was experimenting setting up an API using TSOA and swagger-ui-express. After working for a while where everything was working great, the tsoa spec-and-routes command all of a sudden got stuck. After rolling the code back and forth to try to pinpoint where the issues was I found out that I had created an interface like this:

export interface FindUser extends Pick<User, 
'_id' | 
'name' | 
'dateOfBirth' | 
'height' | 
'nationality' | 
'citizenShip' | 
'username' | 
'link'> {
    id: string
}

I added a linefeed for each field to make them more readable, but this, for some reason makes the script take forever to complete. By splitting the fields to four lines it takes around 40s to complete. With 3 lines it takes around 12s and with one line only 4s.

Can someone explain why this is?

I was only able to find this old post on github https://github.com/lukeautry/tsoa/issues/107 which concluded that the issue was tsc without any further comments.

I am using typescript 4.4.4 and tsoa 3.14.0

0 Answers0