Open st3iny opened 3 months ago
lib/date.ts:21:2 - error TS2322: Type 'number' is not assignable to type '0 | 2 | 1 | 3 | 4 | 5 | 6'.
21 return window.firstDay
I guess I have to adjust our typings library as well :upside_down_face:
Or would you accept a as any
or as (0 | 1 | 2 | 3 | 4 | 5 | 6)
workaround?
I guess I have to adjust our typings library as well 🙃
Please do so :)
Or would you accept a as any or as (0 | 1 | 2 | 3 | 4 | 5 | 6) workaround?
In addition to the typings change, yes please use as (0 | 1 | 2 | 3 | 4 | 5 | 6)
:)
You can also just define a type alias like
type WeekDay = 0 | 1 | ...
Nice to have after https://github.com/nextcloud/server/pull/46592