Please help try it out and create issues for any bugs/unexpected behaviors you run into. Also come join the discussion here or on Discord thread for beta 20
router-lite: can* hook semantics by @Sayan751 (#2002) (ac5359f) canLoad/canUnload hooks now only treat false as false.
Previously canLoad and canUnload only consider true as can do, means if a routing component has either the hook canLoad/canUnload,
those hooks must return true to load/unload. This is not consistent with the rest of the frameowrk, and generally will be easier to miss during refactoring.
router: navigation coordinator refactor by @jwx (#1997) (1b97340) canLoad/canUnload hooks now only treat false as false.
Moves responsibilities and recursive code from routing scope to iterative code in navigation coordinator.
Refresh and browser back and forward now behave the same way deep links does; if a viewport with a default component/route has been emptied/cleared the mentioned browser actions will now load the default (instead of keeping the viewport empty).
tooling: bindable inheritance (bb1fe26)
When generating types for .html file with convention, bindables export will be a record, instead of array now.
Applications migrating from beta.15-beta.19 will need to change the types for .html modules in resource.d.ts like the following example:
metadata: metadata is defined on the immediate target class, instead of first available metadata source (i.e inherited from parent) by @Sayan751 (#1992) (bb1fe26)
Bug Fixes:
router-lite: external attribute for href by @Sayan751 (#2000) (f062ba0)
Refactorings:
validation: state rule using record to declare messages by @Sayan751 (9df93e0)
Hello,
Iāve just made a new webpack project. Added only @bindable firstName = '' ; in MyApp class and got the error bellow:
TS1270: Decorator function return type '(target: unknown, context: ClassDecoratorContext<abstract new (...args: any) => any> | ClassFieldDecoratorContext<unknown, unknown> | ClassGetterDecoratorContext<unknown, unknown>) => void' is not assignable to type 'void | ((this: MyApp, value: string) => string)'.
Type ā(target: unknown, context: ClassDecoratorContext<abstract new (ā¦args: any) => any> | ClassFieldDecoratorContext<unknown, unknown> | ClassGetterDecoratorContext<unknown, unknown>) => voidā is not assignable to type ā(this: MyApp, value: string) => stringā.
Target signature provides too few arguments. Expected 2 or more, but got 1.
This is typescript 5.5 doing, itās trying to be too smart and āover-inferā the typing for the 2 parameter in the decorator usage. Iām not sure what to do to fix this issue yet.
To fix this, you can change typescript version to 5.4.x