solidjs/templates

Incorrect type in `ts-router` template

pontakornth opened this issue · 1 comments

In ./src/pages/about.data.ts, useRouteData<() => string> makes the variable name has type string.

The error is

 This expression is not callable.
  Type 'String' has no call signatures.ts(2349)

It happens when the code tries to call name() as a signal. The workaround is to make the type () => () => string instead but I don't think it is what we should do.

Edit: Another workaround is to remove type RouteDataFunc in AboutData.

This should be fixed now, thanks! :)