ListKeysAsync() doesn't appear in the functions list when trying to write it

Function:

Beta Features: none

This is because GetDatastore is typechecked to return a GlobalDataStore instance rather than a DataStore instance; in-fact all Datastore 2.0 functions cannot be typechecked with a datastore returned via GetDatastore without overriding the type manually. This issue would be easily mitigated by simply changing the return type to DataStore

isnt there any reason why do they keep it, so you need to manually change the type?

Yeah I wish they did, it would be helpful. Instead of having to remember the syntax.

Thanks for the report! I filed a ticket in our internal database.

1 Like

If anything, its probably just a legacy thing, OrderedDatastores inherit from GlobalDataStore so the V2 functions couldn’t be added directly to that class (since OrderedDatastores never got V2 support). I’m unsure if the ‘DataStore’ class always existed or if it was just made to support V2 typechecking, but if its the latter, then the current setup could simply just be an oversight.

1 Like