Reputation: 19222
When upgrading from ServiceStack 5.0.3 to 5.2 and then attempting to generate TypeScript DTOs the following example was rendered
// @Route("/boms/{sortColumn}/{sortAscending}", "GET")
export class GetUserLists implements IReturn<UserListModel[]>
{
public sortColumn: number;
public sortAscending: boolean;
public createResponse() { return Array<UserListModel>; }
public getTypeName() { return 'GetUserLists'; }
}
instead of something like this:
// @Route("/boms/{sortColumn}/{sortAscending}", "GET")
export class GetUserLists implements IReturn<Array<UserListModel>>
{
sortColumn: number;
sortAscending: boolean;
createResponse() { return Array<UserListModel>(); }
getTypeName() { return 'GetUserLists'; }
}
It's the missing () that causes the syntax error.
When I reverted back to ServiceStack 5.0.3,the generated dtos.ts was correct and compiled.
Upvotes: 2
Views: 30
Reputation: 143359
This should be resolved from this commit, this change is available from v5.2.1 that's now available on MyGet.
Upvotes: 1