I wish there was a good issue template, but seems like no.
So I will try to include everything I have discovered and everything I think may be useful.
Types I use:
Types.zip
Had to put them in .zip because github doesn't let to upload .lua or .luau files
It causes errors in every single file that imports Widget.luau so I don't think I have to include files unless it's gonna be impossible to reproduce the error.
All the errors:
errors.txt
It just put error on every single thing and I had my 2 whole files red.
And I noticed that error disappears if I remove these two lines from Widget.Interface type:
setModifier: <K>(name: K & keyof<Modifier.Modifiers>, params: index<Modifier.Modifiers, K>) -> (),
getModifier: <K>(name: K & keyof<Modifier.Components>) -> index<Modifier.Components, K>,
Also removing these 4 lines from Modifier.Component makes errors disappear too:
read setProperty: <K>(key: K & KeyOf<Props>, value: NonNil<Resolve<Props, K>> | Ref.Instance<NonNil<Resolve<Props, K>>>) -> (),
read snapProperty: <K>(key: K & KeyOf<Props>, value: NonNil<Resolve<Props, K>> | Ref.Instance<NonNil<Resolve<Props, K>>>) -> (),
read getProperty: <K>(key: K & KeyOf<Props>) -> NonNil<Resolve<Props, K>>,
read observe: <K>(key: K & KeyOf<Props>, callback: (newValue: NonNil<Resolve<Props, K>>) -> ()) -> (() -> ()),
Even one line of any produces errors.
Any of these is very important to me and putting type any would make a lot of stuff useless.
Also note: I have tried removing any type function and using keyof and index instead of KeyOf and Resolve functions, so problem is not in functions. And I use these two because keyof and index work poorly with my types and I have to do "property" :: "property" to get singletones.
I wish there was a good issue template, but seems like no.
So I will try to include everything I have discovered and everything I think may be useful.
Types I use:
Types.zip
It causes errors in every single file that imports
Widget.luauso I don't think I have to include files unless it's gonna be impossible to reproduce the error.All the errors:
errors.txt
It just put error on every single thing and I had my 2 whole files red.
And I noticed that error disappears if I remove these two lines from Widget.Interface type:
Also removing these 4 lines from Modifier.Component makes errors disappear too:
Even one line of any produces errors.
Any of these is very important to me and putting type
anywould make a lot of stuff useless.Also note: I have tried removing any type function and using
keyofandindexinstead ofKeyOfandResolvefunctions, so problem is not in functions. And I use these two becausekeyofandindexwork poorly with my types and I have to do"property" :: "property"to get singletones.