@rbxts/types 1.0.578 → 1.0.581

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8887,7 +8887,7 @@ interface DataStoreService extends Instance {
8887
8887
  *
8888
8888
  * * [Data Stores](https://developer.roblox.com/en-us/articles/data-store), an in-depth guide on data structure, management, error handling, etc.
8889
8889
  */
8890
- GetDataStore(this: DataStoreService, name: string, scope?: string): GlobalDataStore;
8890
+ GetDataStore(this: DataStoreService, name: string, scope?: string, options?: DataStoreOptions): DataStore;
8891
8891
  /**
8892
8892
  * This function returns the default [GlobalDataStore](https://developer.roblox.com/en-us/api-reference/class/GlobalDataStore). If you want to access a specific **named** data store instead, you should use the [GetDataStore()](https://developer.roblox.com/en-us/api-reference/function/DataStoreService/GetDataStore) function.
8893
8893
  */
@@ -10129,7 +10129,7 @@ interface GlobalDataStore extends Instance {
10129
10129
  * * [Data Stores](https://developer.roblox.com/en-us/articles/data-store), an in-depth guide on data structure, management, error handling, etc.
10130
10130
  * Tags: Yields
10131
10131
  */
10132
- GetAsync<T>(this: GlobalDataStore, key: string): T | undefined;
10132
+ GetAsync(this: GlobalDataStore, key: string): unknown;
10133
10133
  /**
10134
10134
  * This function increments the value of a key by the provided amount (both must be integers).
10135
10135
  *
@@ -10141,7 +10141,7 @@ interface GlobalDataStore extends Instance {
10141
10141
  * * [Data Stores](https://developer.roblox.com/en-us/articles/data-store), an in-depth guide on data structure, management, error handling, etc.
10142
10142
  * Tags: Yields
10143
10143
  */
10144
- IncrementAsync(this: GlobalDataStore, key: string, delta?: number): number;
10144
+ IncrementAsync(this: GlobalDataStore, key: string, delta?: number, userIds?: Array<any>, options?: DataStoreIncrementOptions): unknown;
10145
10145
  /**
10146
10146
  * This function marks the specified key as deleted by creating a new “tombstone” version of the key. Prior to this, it returns the latest version prior to the remove call.
10147
10147
  *
@@ -10159,7 +10159,7 @@ interface GlobalDataStore extends Instance {
10159
10159
  * * [Data Stores](https://developer.roblox.com/en-us/articles/data-store), an in-depth guide on data structure, management, error handling, etc.
10160
10160
  * Tags: Yields
10161
10161
  */
10162
- RemoveAsync<T>(this: GlobalDataStore, key: string): T | undefined;
10162
+ RemoveAsync(this: GlobalDataStore, key: string): unknown;
10163
10163
  /**
10164
10164
  * This function sets the latest value, [UserIds](https://developer.roblox.com/en-us/api-reference/property/Player/UserId), and metadata for the given key.
10165
10165
  *
@@ -10239,6 +10239,32 @@ interface DataStore extends GlobalDataStore {
10239
10239
  * @deprecated
10240
10240
  */
10241
10241
  readonly _nominal_DataStore: unique symbol;
10242
+ GetAsync<T>(this: DataStore, key: string): LuaTuple<[T | undefined, DataStoreKeyInfo]>;
10243
+ IncrementAsync(
10244
+ this: DataStore,
10245
+ key: string,
10246
+ delta?: number,
10247
+ userIds?: Array<number>,
10248
+ options?: DataStoreIncrementOptions,
10249
+ ): LuaTuple<[number, DataStoreKeyInfo]>;
10250
+ SetAsync(
10251
+ this: DataStore,
10252
+ key: string,
10253
+ value?: unknown,
10254
+ userIds?: Array<number>,
10255
+ options?: DataStoreSetOptions,
10256
+ ): string;
10257
+ UpdateAsync<O, R>(
10258
+ this: DataStore,
10259
+ key: string,
10260
+ transformFunction: (
10261
+ oldValue: O | undefined,
10262
+ keyInfo: DataStoreKeyInfo,
10263
+ ) => LuaTuple<[newValue: R, userIds?: Array<number>, metadata?: object]>,
10264
+ ): R extends undefined
10265
+ ? LuaTuple<[newValue: O | undefined, keyInfo: DataStoreKeyInfo]>
10266
+ : LuaTuple<[newValue: R, keyInfo: DataStoreKeyInfo]>;
10267
+ RemoveAsync<T>(this: DataStore, key: string): LuaTuple<[T | undefined, DataStoreKeyInfo]>;
10242
10268
  /**
10243
10269
  * This function retrieves the specified key version as well as a [DataStoreKeyInfo](https://developer.roblox.com/en-us/api-reference/class/DataStoreKeyInfo) instance. A version identifier can be found through [DataStore:ListVersionsAsync](https://developer.roblox.com/en-us/api-reference/function/DataStore/ListVersionsAsync) or alternatively be the identifier returned by [GlobalDataStore:SetAsync](https://developer.roblox.com/en-us/api-reference/function/GlobalDataStore/SetAsync).
10244
10270
  *
@@ -10248,7 +10274,11 @@ interface DataStore extends GlobalDataStore {
10248
10274
  * * [Data Stores](https://developer.roblox.com/en-us/articles/data-store), an in-depth guide on data structure, management, error handling, etc.
10249
10275
  * Tags: Yields
10250
10276
  */
10251
- GetVersionAsync(this: DataStore, key: string, version: string): unknown;
10277
+ GetVersionAsync(
10278
+ this: DataStore,
10279
+ key: string,
10280
+ version: string,
10281
+ ): LuaTuple<[value: unknown, keyInfo: DataStoreKeyInfo]>;
10252
10282
  /**
10253
10283
  * This function returns a [DataStoreKeyPages](https://developer.roblox.com/en-us/api-reference/class/DataStoreKeyPages) object for enumerating through keys of a data store. It accepts an optional `prefix` parameter to only locate keys whose names start with the provided prefix.
10254
10284
  *
@@ -10298,6 +10328,9 @@ interface OrderedDataStore extends GlobalDataStore {
10298
10328
  * @deprecated
10299
10329
  */
10300
10330
  readonly _nominal_OrderedDataStore: unique symbol;
10331
+ GetAsync(this: OrderedDataStore, key: string): number | undefined;
10332
+ IncrementAsync(this: OrderedDataStore, key: string, delta?: number): number;
10333
+ RemoveAsync(this: OrderedDataStore, key: string): number;
10301
10334
  /**
10302
10335
  * Returns a [DataStorePages](https://developer.roblox.com/en-us/api-reference/class/DataStorePages) object. The sort order is determined by **ascending**, the length of each page by **pageSize**, and **minValue** /**maxValue** are optional parameters which filter the results.
10303
10336
  *
@@ -24684,6 +24717,7 @@ interface DataStoreVersionPages extends Pages {
24684
24717
  * @deprecated
24685
24718
  */
24686
24719
  readonly _nominal_DataStoreVersionPages: unique symbol;
24720
+ GetCurrentPage(this: Pages): Array<DataStoreObjectVersionInfo>;
24687
24721
  }
24688
24722
 
24689
24723
  /** FriendPages is a special version of the [Pages](https://developer.roblox.com/en-us/api-reference/class/Pages) returned by [Players:GetFriendsAsync](https://developer.roblox.com/en-us/api-reference/function/Players/GetFriendsAsync). The items contained within describe information about a player's friends, and have the following structure:
@@ -31301,7 +31335,13 @@ interface TeleportService extends Instance {
31301
31335
  * For an in-depth guide on teleporting players and properly handling teleport failures, see the [Teleporting Between Places](https://developer.roblox.com/en-us/articles/Teleporting-Between-Places) article.
31302
31336
  */
31303
31337
  readonly TeleportInitFailed: RBXScriptSignal<
31304
- (player: Player, teleportResult: Enum.TeleportResult, errorMessage: string) => void
31338
+ (
31339
+ player: Player,
31340
+ teleportResult: Enum.TeleportResult,
31341
+ errorMessage: string,
31342
+ placeId: number,
31343
+ teleportOptions: TeleportOptions,
31344
+ ) => void
31305
31345
  >;
31306
31346
  }
31307
31347
 
@@ -1655,9 +1655,27 @@ interface Random {
1655
1655
  * @deprecated
1656
1656
  */
1657
1657
  readonly _nominal_Random: unique symbol;
1658
+ /**
1659
+ * Returns a pseudorandom integer uniformly distributed over [min, max].
1660
+ */
1658
1661
  NextInteger(this: Random, min: number, max: number): number;
1662
+ /**
1663
+ * Returns a pseudorandom number uniformly distributed over [0, 1).
1664
+ */
1659
1665
  NextNumber(this: Random): number;
1666
+ /**
1667
+ * Returns a pseudorandom number uniformly distributed over [min, max).
1668
+ */
1660
1669
  NextNumber(this: Random, min: number, max: number): number;
1670
+ /**
1671
+ * Returns a unit vector with a pseudorandom direction.
1672
+ *
1673
+ * Vectors returned from this function are uniformly distributed over the unit sphere.
1674
+ */
1675
+ NextUnitVector(this: Random): Vector3;
1676
+ /**
1677
+ * Returns a new Random object with the same state as the original.
1678
+ */
1661
1679
  Clone(this: Random): Random;
1662
1680
  }
1663
1681
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rbxts/types",
3
- "version": "1.0.578",
3
+ "version": "1.0.581",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },