[API Definition Issue] DataStoreService's method GetDataStore returns type GlobaDataStore instead of DataStore

Info

System: Windows 10 - 64bit
Studio Version: Version 0.613.1.6130510 (64bit)

Description

DataStoreService’s method GetDataStore returns type GlobaDataStore instead of DataStore

It’s also a small inconsistency in the Documentation.

GetOrderedDataStore returns an OrderedDataStore.
GetGlobalDataStore returns an GlobalDataStore.

and GetDataStore``'s definition doesn't return a DataStore`

Reproduction Steps

Copy paste this code:

local DataStoreService = game:GetService("DataStoreService")


local DS_Test2 = DataStoreService:GetDataStore("test_2")

Then type DS_Test2 so that the autocomplete starts stepping in. Compare it to the image attached in the Description.

Expected Result

That it returns DataStore instead.

image

Actual Result

It returns GlobalDataStore.

I think this is why

If I look at the API Dump.

This is just an acknowledgment announcement!

We’ve filed a ticket into our internal database for this issue, and we will update you when we have further information!

Thanks for the report!

1 Like

Alright. Let’s see.

I…

Okay, let’s see. It looks like that this was fixed. :D

Very Cool!

 

However… now I don’t know…

image

Now GetGlobalDataStore doesn’t return GlobalDataStore anymore though.

But maybe that’s not an issue, because the methods a DataStore has, seems to be available for a GlobalDataStore as well.

Hi, thank you for your feedback.

We recently release a fix that changed the return type of GetDataStore() and GetGlobalDataStore() to DataStore. And you are correct that DataStore inherits all the methods from GlobalDataStore. Please let us know if you have any additional comments or suggestions.

Happy building!