Closed GrantGryczan closed 1 year ago
A: I remove autocomplete from requirements
and allow people to add criteria that aren't used (when requirements
is in use)
B: I keep it as is (autocompletes, errors if a criterion isn't used, I wish I could make it warn instead)
C: Continue to wrangle TS and maybe give auto-complete to A somehow
I'm gonna go with B for now.
especially since you can get around it easily now with RawResource
(Worth noting I think a type assertion on requirements
would probably be a better way around it than RawResource
.)
I can't think of any use case for not specifying all criteria in requirements
currently, so if it's complicated to fix this then it's not worth it unless someone finds a real use case in the future.
Example:
This should be inferred as
Advancement<'a' | 'b'>
, notAdvancement<'a'>
. Otherwise it thinksb
is not a valid criterion.Worst case, this should be fixed by removing this type parameter and accepting any
string[]
inrequirements
.