From 16cf89e1bb89a37ce5a37522694d50843042a5f0 Mon Sep 17 00:00:00 2001 From: JohnnyMorganz Date: Sat, 4 Nov 2023 15:41:43 +0100 Subject: [PATCH] Fix type definition for OrderedDataStore:GetSortedAsync Fixes #480 --- scripts/dumpRobloxTypes.py | 2 +- scripts/globalTypes.d.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/dumpRobloxTypes.py b/scripts/dumpRobloxTypes.py index cb85523c..d8d563b0 100644 --- a/scripts/dumpRobloxTypes.py +++ b/scripts/dumpRobloxTypes.py @@ -444,7 +444,7 @@ # So we override the method's types to use numbers instead of any "OrderedDataStore": [ "function GetAsync(self, key: string): (number?, DataStoreKeyInfo)", - "function GetSortedAsync(self, ascending: boolean, pageSize: number, minValue: number, maxValue: number): DataStorePages", + "function GetSortedAsync(self, ascending: boolean, pageSize: number, minValue: number?, maxValue: number?): DataStorePages", "function RemoveAsync(self, key: string): (number?, DataStoreKeyInfo)", "function SetAsync(self, key: string, value: number, userIds: { number }?, options: DataStoreSetOptions?): string", "function UpdateAsync(self, key: string, transformFunction: ((number?, DataStoreKeyInfo) -> (number, { number }?, {}?))): (number?, DataStoreKeyInfo)", diff --git a/scripts/globalTypes.d.lua b/scripts/globalTypes.d.lua index 5849717a..747de4c1 100644 --- a/scripts/globalTypes.d.lua +++ b/scripts/globalTypes.d.lua @@ -6418,7 +6418,7 @@ end declare class OrderedDataStore extends GlobalDataStore function GetAsync(self, key: string): (number?, DataStoreKeyInfo) - function GetSortedAsync(self, ascending: boolean, pageSize: number, minValue: number, maxValue: number): DataStorePages + function GetSortedAsync(self, ascending: boolean, pageSize: number, minValue: number?, maxValue: number?): DataStorePages function RemoveAsync(self, key: string): (number?, DataStoreKeyInfo) function SetAsync(self, key: string, value: number, userIds: { number }?, options: DataStoreSetOptions?): string function UpdateAsync(self, key: string, transformFunction: ((number?, DataStoreKeyInfo) -> (number, { number }?, {}?))): (number?, DataStoreKeyInfo)