totaljs / framework4

Total.js framework v4
https://www.totaljs.com
Other
99 stars 36 forks source link

A couple extra type fixes #52

Closed willful759 closed 1 year ago

willful759 commented 1 year ago

A couple extra improvements that I forgot to do last time, most important is that Dollar.success' argument value had the type undefined, this actually forces typescript to never accept any value (aside from undefined), changed this to value?: any.

Also, I split ROUTE into 3 overloads, one for action: RouteAction, one for view: string, and then without these arguments, but with the optional values flags and length left intact, this should cover the most common use cases for ROUTE.

ROUTE("...", action, [...]);
ROUTE("...", "view", [...]);
ROUTE("... *Schema --> action", [...]);