Skip to content

MemoryStoreService:UpdateAsync types are wrong #1394

Open

Description

@jackTabsCode

The transform function is supposed to accept the old value and sort key, and return both the new value and sort key, or nil if the update is supposed to be cancelled. The current implementation does not have the sort key in the input or return, and also the return is not nullable when it should be.

Additionally the return value of the method is supposed to reflect the return of the transform function, which includes the sort key, and should also be nullable.

UpdateAsync<T>(
this: MemoryStoreSortedMap,
key: string,
transformFunction: (value: unknown) => T,
expiration: number,
): T;

https://create.roblox.com/docs/reference/engine/classes/MemoryStoreSortedMap#UpdateAsync

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions