@rbxts/types
Version:
TypeScript typings for the Roblox platform. Partially handwritten and partially automatically generated.
1,626 lines (1,514 loc) • 99.5 kB
TypeScript
/// <reference no-default-lib="true"/>
/// <reference path="lua.d.ts" />
/// <reference path="macro_math.d.ts" />
/// <reference path="generated/enums.d.ts" />
/// <reference path="generated/None.d.ts" />
/// <reference types="@rbxts/compiler-types" />
// ROBLOX API
/**
* Intersecting a type with this allows access to Roblox's `Instance.Changed` event.
*
* @example
* function f(p: Part) {
* (p as Part & ChangedSignal).Changed.Connect(changedPropertyName => {})
* }
*/
type ChangedSignal = {
/**
* If you want to detect changes of a single property only, you should use [Instance.GetPropertyChangedSignal](https://developer.roblox.com/api-reference/function/Instance/GetPropertyChangedSignal) instead!
*
* The Changed event fires right after most properties change on objects. It is possible to find the present value of a changed property by using `object[property]`. To get the value of a property before it changes, you must have stored the value of the property before it changed.
*
* If you are only interested in listening to the change of a specific property, consider using the `GetPropertyChangedSignal` method instead to get an event that only fires when a given property changes.
*
* This event does not fire for physics-related changes, like when the `CFrame`, `Velocity`, `RotVelocity`, `Position`, `Orientation` and `CFrame` properties of a `BasePart` change due to gravity. To detect changes in these properties, consider using a physics-based event like `RunService.Stepped` or `BasePart.Touched`. A while-true-do loop can also work.
*
* For "-Value" objects, this event behaves differently: it only fires when the `Value` property changes. See individual pages for `IntValue`, `StringValue`, etc for more information. To detect other changes in these objects, you must use `GetPropertyChangedSignal` instead.
*/
readonly Changed: RBXScriptSignal<(changedPropertyName: string) => void>;
};
type Tweenable = number | boolean | CFrame | Rect | Color3 | UDim | UDim2 | Vector2 | Vector2int16 | Vector3;
interface EmoteDictionary {
/** When these arrays have more than one emote id in them, it will randomly select one of the emotes to play from the list. */
[emoteName: string]: Array<number>;
}
type EquippedEmotes = Array<{ Name: string; Slot: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 }>;
interface UserInfo {
Id: number;
Username: string;
DisplayName: string;
}
interface GroupInfo {
Name: string;
Id: number;
Owner: {
Name: string;
Id: number;
};
EmblemUrl: string;
Description: string;
Roles: Array<{
Name: string;
Rank: number;
}>;
}
interface GetGroupsAsyncResult {
Name: string;
Id: number;
EmblemUrl: string;
Description: string;
Rank: number;
Role: string;
IsPrimary: boolean;
IsInClan: boolean;
}
type HttpHeaders = Record<string, string> | Map<string, string>;
interface RequestAsyncRequest {
Url: string;
Method?: "GET" | "HEAD" | "POST" | "PUT" | "DELETE" | "PATCH";
Body?: string;
Headers?: HttpHeaders;
Compress?: Enum.HttpCompression;
}
interface RequestAsyncResponse {
Success: boolean;
StatusCode: number;
StatusMessage: string;
Headers: Record<string, string>;
Body: string;
}
interface SetInfo {
AssetSetId: string;
CategoryId: string;
CreatorName: string;
Description: string;
ImageAssetId: string;
Name: string;
SetType: string;
}
interface CollectionInfo {
AssetId: string;
AssetSetId: string;
AssetVersionId: string;
IsTrusted: boolean;
Name: string;
CreatorName: string;
}
interface BaseAccessoryInfo {
AssetId: number;
AccessoryType: Enum.AccessoryType;
}
interface RigidAccessoryInfo extends BaseAccessoryInfo {
IsLayered: false;
}
interface LayeredAccessoryInfo extends BaseAccessoryInfo {
IsLayered: true;
Order: number;
Puffiness?: number;
}
type AccessoryInfo = RigidAccessoryInfo | LayeredAccessoryInfo;
interface FreeSearchResult {
CurrentStartIndex: string;
Results: Array<{
AssetId: string;
AssetVersionId: string;
CreatorName: string;
Name: string;
}>;
TotalCount: string;
}
interface LocalizationEntry {
Key: string;
Source: string;
Context: string;
Example: string;
Values: Map<string, string>;
}
interface LogInfo {
message: string;
messageType: Enum.MessageType;
timestamp: number;
}
interface ReceiptInfo {
/** the id of the player making the purchase */
PlayerId: number;
/** the specific place where the purchase was made */
PlaceIdWherePurchased: number;
/** a unique identifier for the purchase, should be used to prevent granting an item multiple times for one purchase */
PurchaseId: string;
/** the id of the purchased product */
ProductId: number;
/** the type of currency used (Tix, Robux) */
CurrencyType: Enum.CurrencyType;
/** the amount of currency spent on the product for this purchase */
CurrencySpent: number;
}
interface ProductInfo {
/** The name shown on the asset's page */
Name: string;
/** The description as shown on the asset's page; May be `undefined` if the description is empty. */
Description: string | undefined;
/** The cost of purchasing the asset using Robux */
PriceInRobux: number | undefined;
/** Timestamp of when the asset was created, e.g. `2018-08-01T17:55:11.98Z` */
Created: string;
/** Timestamp of when the asset was last updated by its creator, e.g. `2018-08-01T17:55:11.98Z` */
Updated: string;
/** Describes whether the asset is purchasable */
IsForSale: boolean;
/** The number of items the asset has been sold */
Sales: number | undefined;
ProductId: number;
/** A table of information describing the creator of the asset */
Creator: {
/** Either `User` or `Group` */
CreatorType: "User" | "Group" | undefined;
/** The ID of the creator user or group */
CreatorTargetId: number;
/** The name/username of the creator */
Name: string | undefined;
};
TargetId: number;
}
interface AssetProductInfo extends ProductInfo {
/** Describes whether the asset is a User Product, Developer Product, or Game Pass */
ProductType: "User Product";
/** If InfoType was Asset, this is the ID of the given asset. */
AssetId: number;
/** The [type of asset](https://developer.roblox.com/articles/Asset-types) (e.g. place, model, shirt). In TypeScript, you should compare this value to a member of the `AssetTypeId` const enum. */
AssetTypeId: AssetTypeId;
/** Describes whether the asset is marked as "new" in the catalog */
IsNew: boolean;
/** Describes whether the asset is a "limited item" that is no longer (if ever) sold */
IsLimited: boolean;
/** Describes whether the asset is a "limited unique" ("Limited U") item that only has a fixed number sold */
IsLimitedUnique: boolean;
/** Describes whether the asset can be taken for free */
IsPublicDomain: boolean;
/** The remaining number of items a limited unique item may be sold */
Remaining: number | undefined;
/** Indicates whether the item is marked as 13+ in catalog */
ContentRatingTypeId: number;
/** The minimum Builder's Club subscription necessary to purchase the item */
MinimumMembershipLevel: number;
}
interface DeveloperProductInfo extends ProductInfo {
/** Describes whether the asset is a User Product, Developer Product, or Game Pass */
ProductType: "Developer Product";
IconImageAssetId: number;
}
interface GamePassProductInfo extends ProductInfo {
/** Describes whether the asset is a User Product, Developer Product, or Game Pass */
ProductType: "Game Pass";
IconImageAssetId: number;
}
interface SubscriptionProductInfo extends ProductInfo {
/** Describes whether the asset is a User Product, Developer Product, or Game Pass */
ProductType: "Subscription";
}
interface BadgeInfo {
/** The name of the badge. */
Name: string;
/** The description of the badge. */
Description: string;
/** The asset ID of the image for this badge. */
IconImageId: number;
/** Indicates whether this badge is available to be awarded. */
IsEnabled: boolean;
}
interface BundleInfo {
/** What kind of Bundle this is */
BundleType: "BodyParts" | "AvatarAnimations";
/** The Description of the Bundle */
Description: string;
/** The Bundle Id */
Id: number;
/** An array of all assets contained within this bundle */
Items: Array<{
/** The Id of the individual item */
Id: number;
/** The name of the individual asset */
Name: string;
/** What type the individual asset is */
Type: "Asset" | "UserOutfit";
}>;
/** The name of the Bundle */
Name: string;
}
type TeleportData = string | number | boolean | Array<unknown> | Map<unknown, unknown>;
interface PlayerJoinInfo {
/** The `DataModel.GameId` of the experience the `Player` teleported from. Only present if the player teleports to the current experience and if a server calls the teleport function. */
SourceGameId?: number;
/** The `DataModel.PlaceId` of the place the `Player` teleported from. Only present if the player teleports to the current place and a server calls the teleport function. */
SourcePlaceId?: number;
/** An array containing the `UserId` numbers of the users teleported alongside the `Player`. Only present if the player teleported as part of a group. */
Members?: Array<number>;
/** Reflects the `teleportData` specified in the original teleport. Useful for sharing information between servers the player teleports to. Only present if `teleportData` was specified and a server calls the teleport function. */
TeleportData?: TeleportData;
/** A string containing launch data specified in the URL the player clicks to join the experience. Only present if the URL contains launch data. */
LaunchData?: string;
}
interface BoundActionInfo {
inputTypes: Array<Enum.KeyCode | Enum.PlayerActions | Enum.UserInputType | string>;
priorityLevel: number;
stackOrder: number;
}
declare const enum AssetTypeId {
Image = 1,
TShirt = 2,
Audio = 3,
Mesh = 4,
Lua = 5,
Hat = 8,
Place = 9,
Model = 10,
Shirt = 11,
Pants = 12,
Decal = 13,
Head = 17,
Face = 18,
Gear = 19,
Badge = 21,
Animation = 24,
Torso = 27,
RightArm = 28,
LeftArm = 29,
LeftLeg = 30,
RightLeg = 31,
Package = 32,
GamePass = 34,
Plugin = 38,
MeshPart = 40,
HairAccessory = 41,
FaceAccessory = 42,
NeckAccessory = 43,
ShoulderAccessory = 44,
FrontAccessory = 45,
BackAccessory = 46,
WaistAccessory = 47,
ClimbAnimation = 48,
DeathAnimation = 49,
FallAnimation = 50,
IdleAnimation = 51,
JumpAnimation = 52,
RunAnimation = 53,
SwimAnimation = 54,
WalkAnimation = 55,
PoseAnimation = 56,
EarAccessory = 57,
EyeAccessory = 58,
EmoteAnimation = 61,
Video = 62,
TShirtAccessory = 64,
ShirtAccessory = 65,
PantsAccessory = 66,
JacketAccessory = 67,
SweaterAccessory = 68,
ShortsAccessory = 69,
LeftShoeAccessory = 70,
RightShoeAccessory = 71,
DressSkirtAccessory = 72,
FontFamily = 73,
EyebrowAccessory = 76,
EyelashAccessory = 77,
MoodAnimation = 78,
DynamicHead = 79,
}
interface AgentParameters {
/** Humanoid radius. Used to determine the minimum separation from obstacles. */
AgentRadius?: number;
/** Humanoid height.
* Empty space smaller than this value, like the space under stairs, will be marked as non-traversable.
*/
AgentHeight?: number;
/** Sets whether off-mesh links for jumping are allowed. */
AgentCanJump?: boolean;
/** Determines whether climbing `TrussParts` during pathfinding is allowed. */
AgentCanClimb?: boolean;
/** Determines the spacing between intermediate waypoints in path. */
WaypointSpacing?: number;
/** Table of materials or defined PathfindingModifiers and their "cost" for traversal. Useful for making the agent prefer certain materials/regions over others. */
Costs?: { [K in Enum.Material["Name"]]?: number } & { [index: string]: number };
}
interface CollisionGroupInfo {
mask: number;
name: string;
}
declare const enum LocationType {
MobileWebsite = 0,
MobileInGame = 1,
Website = 2,
Studio = 3,
InGame = 4,
XBoxApp = 5,
TeamCreate = 6,
}
interface FriendOnlineInfoBase {
/** The UserId of the friend. */
VisitorId: number;
/** The user name of the friend. */
UserName: string;
/** The display name of the friend. */
DisplayName: string;
/** When the user was last online. */
LastOnline: string;
/** If the friend is currently online. */
IsOnline: boolean;
/** The name of the friends current location. */
LastLocation: string;
}
interface FriendOnlineInfoWebsite extends FriendOnlineInfoBase {
/** A numeric enum of the friends last location.
* In TS, you can check this value against the `LocationType` const enum
*/
LocationType: LocationType.MobileWebsite | LocationType.Website | LocationType.XBoxApp;
}
interface FriendOnlineInfoGame extends FriendOnlineInfoBase {
/** A numeric enum of the friends last location.
* In TS, you can check this value against the `LocationType` const enum
*/
LocationType: LocationType.MobileInGame | LocationType.InGame | LocationType.TeamCreate;
/** The placeId of the friends last location. Check the `LocationType` to determine whether this property exists. */
PlaceId: number;
/** The DataModel / JobId of the friends last location.
* Check the `LocationType` to determine whether this property exists.
*/
GameId: string;
}
interface FriendOnlineInfoStudio extends FriendOnlineInfoBase {
/** A numeric enum of the friends last location.
* In TS, you can check this value against the `LocationType` const enum
*/
LocationType: LocationType.Studio;
/** The placeId of the friends last location. Check the `LocationType` to determine whether this property exists. */
PlaceId: number;
}
type FriendOnlineInfo = FriendOnlineInfoWebsite | FriendOnlineInfoGame | FriendOnlineInfoStudio;
/** A dictionary of an id and name containing information about what type an asset is */
type AssetType =
| { id: AssetTypeId.Image; name: "Image" }
| { id: AssetTypeId.TShirt; name: "TeeShirt" }
| { id: AssetTypeId.Audio; name: "Audio" }
| { id: AssetTypeId.Mesh; name: "Mesh" }
| { id: AssetTypeId.Lua; name: "Lua" }
| { id: AssetTypeId.Hat; name: "Hat" }
| { id: AssetTypeId.Place; name: "Place" }
| { id: AssetTypeId.Model; name: "Model" }
| { id: AssetTypeId.Shirt; name: "Shirt" }
| { id: AssetTypeId.Pants; name: "Pants" }
| { id: AssetTypeId.Decal; name: "Decal" }
| { id: AssetTypeId.Head; name: "Head" }
| { id: AssetTypeId.Face; name: "Face" }
| { id: AssetTypeId.Gear; name: "Gear" }
| { id: AssetTypeId.Badge; name: "Badge" }
| { id: AssetTypeId.Animation; name: "Animation" }
| { id: AssetTypeId.Torso; name: "Torso" }
| { id: AssetTypeId.RightArm; name: "RightArm" }
| { id: AssetTypeId.LeftArm; name: "LeftArm" }
| { id: AssetTypeId.LeftLeg; name: "LeftLeg" }
| { id: AssetTypeId.RightLeg; name: "RightLeg" }
| { id: AssetTypeId.Package; name: "Package" }
| { id: AssetTypeId.GamePass; name: "GamePass" }
| { id: AssetTypeId.Plugin; name: "Plugin" }
| { id: AssetTypeId.MeshPart; name: "MeshPart" }
| { id: AssetTypeId.HairAccessory; name: "HairAccessory" }
| { id: AssetTypeId.FaceAccessory; name: "FaceAccessory" }
| { id: AssetTypeId.NeckAccessory; name: "NeckAccessory" }
| { id: AssetTypeId.ShoulderAccessory; name: "ShoulderAccessory" }
| { id: AssetTypeId.FrontAccessory; name: "FrontAccessory" }
| { id: AssetTypeId.BackAccessory; name: "BackAccessory" }
| { id: AssetTypeId.WaistAccessory; name: "WaistAccessory" }
| { id: AssetTypeId.ClimbAnimation; name: "ClimbAnimation" }
| { id: AssetTypeId.DeathAnimation; name: "DeathAnimation" }
| { id: AssetTypeId.FallAnimation; name: "FallAnimation" }
| { id: AssetTypeId.IdleAnimation; name: "IdleAnimation" }
| { id: AssetTypeId.JumpAnimation; name: "JumpAnimation" }
| { id: AssetTypeId.RunAnimation; name: "RunAnimation" }
| { id: AssetTypeId.SwimAnimation; name: "SwimAnimation" }
| { id: AssetTypeId.WalkAnimation; name: "WalkAnimation" }
| { id: AssetTypeId.PoseAnimation; name: "PoseAnimation" }
| { id: AssetTypeId.EarAccessory; name: "EarAccessory" }
| { id: AssetTypeId.EyeAccessory; name: "EyeAccessory" };
/** Information about a player's avatar in dictionary form */
interface CharacterAppearanceInfo {
/** Describes the BrickColor values for each limb */
bodyColors: {
/** The BrickColor value of the leftArm */
leftArmColorId: keyof BrickColorsByNumber;
/** The BrickColor value of the torso */
torsoColorId: keyof BrickColorsByNumber;
/** The BrickColor value of the rightArm */
rightArmColorId: keyof BrickColorsByNumber;
/** The BrickColor value of the head */
headColorId: keyof BrickColorsByNumber;
/** The BrickColor value of the leftLeg */
leftLegColorId: keyof BrickColorsByNumber;
/** The BrickColor value of the rightLeg */
rightLegColorId: keyof BrickColorsByNumber;
};
/** The assets currently equipped by the Player (hats, body parts, etc, excluding gear) */
assets: Array<{
/** The asset ID of the equipped asset */
id: number;
/** A table with `name` and `id` fields, each describing the kind of asset equipped ("Hat", "Face", etc.). In TypeScript, the `id` can be compared to a member of the `AssetTypeId` const enum. */
assetType: AssetType;
/** The name of the equipped asset */
name: string;
}>;
/** Describes whether default pants are applied */
defaultPantsApplied: boolean;
/** Describes whether default shirt are applied */
defaultShirtApplied: boolean;
/** What kind of avatar it is */
playerAvatarType: "R6" | "R15";
/** A dictionary of scaling properties */
scales: {
bodyType: number;
head: number;
height: number;
proportion: number;
depth: number;
width: number;
};
}
interface MakeSystemMessageConfig {
Text: string;
Color?: Color3;
Font?: Enum.Font;
TextSize?: number;
}
interface SendNotificationConfig {
Title: string;
Text: string;
Icon?: string;
Duration?: number;
Callback?: BindableFunction;
Button1?: string;
Button2?: string;
}
interface PolicyInfo {
/** When true, the player might see immersive ads within an experience. */
AreAdsAllowed: boolean;
/** When true, the player cannot interact with paid (via in-experience currency or Robux) random item generators. */
ArePaidRandomItemsRestricted: boolean;
/** A list of external link references (for example, social media links, handles, or iconography) a player is permitted to see. Possible values include: “Discord”, “Facebook”, “Twitch”, and “YouTube”. */
AllowedExternalLinkReferences: Array<string>;
/** When true, the player is eligible to purchase subscriptions within an experience. */
IsEligibleToPurchaseSubscription: boolean;
/** When true, the player can trade virtual items that they purchased with in-experience currency or Robux. */
IsPaidItemTradingAllowed: boolean;
/** When true, an experience should enforce compliance changes. See [here](https://devforum.roblox.com/t/about-our-upcoming-global-compliance-system/461447) for details. */
IsSubjectToChinaPolicies: boolean;
}
interface AvatarRulesBodyColorsPalette {
HexColor: string;
Name: string;
BrickColorId: number;
}
interface AvatarRules {
BodyColorsPalette: ReadonlyArray<AvatarRulesBodyColorsPalette>;
BundlesEnabledForUser: boolean;
MinimumDeltaEBodyColorDifference: number;
WearableAssetTypes: ReadonlyArray<{
Id: number;
MaxNumber: number;
Name: string;
}>;
ProportionsAndBodyTypeEnabledForUser: boolean;
PlayerAvatarTypes: ReadonlyArray<string>;
Scales: {
BodyType: {
Max: number;
Increment: number;
Min: number;
};
Head: {
Max: number;
Increment: number;
Min: number;
};
Height: {
Max: number;
Increment: number;
Min: number;
};
Proportion: {
Max: number;
Increment: number;
Min: number;
};
Width: {
Max: number;
Increment: number;
Min: number;
};
};
DefaultClothingAssetLists: {
DefaultPantAssetIds: ReadonlyArray<number>;
DefaultShirtAssetIds: ReadonlyArray<number>;
};
EmotesEnabledForUser: boolean;
BasicBodyColorsPalette: ReadonlyArray<AvatarRulesBodyColorsPalette>;
}
interface ItemDetailsBase {
CreatorHasVerifiedBadge: boolean;
Genres: ReadonlyArray<Enum.Genre["Name"]>;
Price: number;
Owned: boolean;
ProductId: number;
ItemRestrictions: ReadonlyArray<string>;
ItemStatus: ReadonlyArray<string>;
SaleLocationType: string;
FavoriteCount: number;
Id: number;
Name: string;
Description: string;
IsPurchasable: boolean;
LowestPrice?: number;
LowestResalePrice?: number;
CreatorTargetId: number;
CreatorName: string;
CreatorType: string;
ExpectedSellerId: number;
}
interface AssetItemDetails extends ItemDetailsBase {
ItemType: "Asset";
AssetType: Enum.AssetType["Name"];
}
interface BundleItemDetails extends ItemDetailsBase {
ItemType: "Bundle";
BundleType: Enum.BundleType["Name"];
BundledItems: ReadonlyArray<{
Owned: boolean;
Id: number;
Name: string;
Type: "Asset" | "UserOutfit";
}>;
}
type ItemDetails = AssetItemDetails | BundleItemDetails;
interface RecommendedAsset {
Item: {
AssetId: number;
Name: string;
Price: number;
PremiumPrice: number;
AbsoluteUrl: string;
AudioUrl: string;
};
Creator: {
CreatorId: number;
CreatorType: string;
Name: string;
CreatorProfileLink: string;
};
Product: {
Id: number;
PriceInRobux: number;
IsForSale: boolean;
IsPublicDomain: boolean;
IsResellable: boolean;
IsLimited: boolean;
IsLimitedUnique: boolean;
SerialNumber: number;
IsRental: boolean;
RentalDurationInHours: number;
BcRequirement: number;
TotalPrivateSales: number;
SellerId: number;
SellerName: string;
LowestPrivateSaleUserAssetId: number;
IsXboxExclusiveItem: boolean;
OffsaleDeadline: string;
NoPriceText: string;
IsFree: boolean;
};
}
interface RecommendedBundle {
Id: number;
Name: string;
Description: string;
BundleType: string;
Items: ReadonlyArray<{
Owned: boolean;
Id: number;
Name: string;
Type: string;
}>;
Creator: {
Id: number;
Name: string;
Type: string;
};
Product: {
Id: number;
Type: string;
IsPublicDomain: boolean;
IsForSale: boolean;
PriceInRobux: number;
PremiumPricing: {
PremiumDiscountPercentage: number;
PremiumPriceInRobux: number;
};
};
}
interface SearchCatalogResultBase {
Id: number;
Name: string;
Description: string;
ProductId: number;
Genres: ReadonlyArray<Enum.Genre["Name"]>;
ItemStatus: ReadonlyArray<string>;
ItemRestrictions: ReadonlyArray<string>;
CreatorType: "User" | "Group";
CreatorTargetId: number;
CreatorName: string;
Price: number;
PremiumPricing: {
PremiumDiscountPercentage: number;
PremiumPriceInRobux: number;
};
LowestPrice: number;
PriceStatus?: string;
UnitsAvailableForConsumption: number;
PurchaseCount: number;
FavoriteCount: number;
SaleLocationType: string;
CreatorHasVerifiedBadge: boolean;
}
interface SearchCatalogAssetResult extends SearchCatalogResultBase {
ItemType: "Asset";
AssetType: Enum.AssetType["Name"];
}
interface SearchCatalogBundleResult extends SearchCatalogResultBase {
ItemType: "Bundle";
BundleType: Enum.BundleType["Name"];
BundledItems: ReadonlyArray<{
Owned: boolean;
Id: number;
Name: string;
Type: "Asset" | "UserOutfit";
}>;
}
type SearchCatalogResult = SearchCatalogAssetResult | SearchCatalogBundleResult;
/**
* RBXScriptConnection, also known as a Connection,
* is a special object returned by the Connect method of an Event (RBXScriptSignal).
* This is used primarily to disconnect a listener from an Event.
*/
interface RBXScriptConnection {
/**
* Describes whether or not the connection is still alive.
* This will become false if connection:Disconnect() is called.
*/
Connected: boolean;
/** Disconnects the connection from the event. */
Disconnect(this: RBXScriptConnection): void;
}
/**
* RBXScriptSignal, more commonly known as an Event, is a special kind of Roblox object.
* It provides a way for user-defined functions, called listeners, to be called when something happens in the game.
* When a certain event happens, the Event is fired, calling any listeners that are connected to the Event.
* An Event may also pass arguments to each listener, to provide extra information about the event that occurred.
*/
interface RBXScriptSignal<T extends Callback = Callback> {
/**
* Establishes a function to be called whenever the event is raised.
* Returns a RBXScriptConnection object associated with the connection.
* @param callback The function to be called whenever the event is fired.
*/
Connect(this: RBXScriptSignal, callback: T): RBXScriptConnection;
ConnectParallel(this: RBXScriptSignal, callback: T): RBXScriptConnection;
Once(this: RBXScriptSignal, callback: T): RBXScriptConnection;
/**
* Yields the current thread until this signal is fired. Returns what was fired to the signal.
*/
Wait(this: RBXScriptSignal): LuaTuple<Parameters<T>>;
}
// generated in generated/None.d.ts
interface Instances {}
interface CreatableInstances {}
// InstanceConstructor
interface InstanceConstructor {
/**
* Creates an new object of type val. The parent argument is optional;
* If it is supplied, the object will be parented to that object.
* Performance note: When the Parent of an object is set,
* Roblox begins listening to a variety of different property changes for replication,
* rendering and physics.
* Therefore, it is recommended to set the Parent property last when creating new objects.
* As such, you should avoid using the second argument (parent) of this function.
* You can read [this thread on the developer forum](https://devforum.roblox.com/t/psa-dont-use-instance-new-with-parent-argument/30296) for more information.
*/
new <T extends keyof CreatableInstances>(className: T, parent?: Instance): CreatableInstances[T];
}
declare const Instance: InstanceConstructor;
/**
* Axes is a datatype used for the ArcHandles class to control what rotation axes are currently enabled.
*/
interface Axes {
/**
* **DO NOT USE!**
*
* This field exists to force TypeScript to recognize this as a nominal type
* @hidden
* @deprecated
*/
readonly _nominal_Axes: unique symbol;
/** Whether the X axis is enabled */
readonly X: boolean;
/** Whether the Y axis is enabled */
readonly Y: boolean;
/** Whether the Z axis is enabled */
readonly Z: boolean;
/** Whether the top face is included */
readonly Top: boolean;
/** Whether the bottom face is included */
readonly Bottom: boolean;
/** Whether the left face is included */
readonly Left: boolean;
/** Whether the right face is included */
readonly Right: boolean;
/** Whether the back face is included */
readonly Back: boolean;
/** Whether the front face is included */
readonly Front: boolean;
}
type AxesConstructor = new (...axes: Array<Enum.Axis | Enum.NormalId>) => Axes;
declare const Axes: AxesConstructor;
interface BrickColor<T extends keyof BrickColorsByNumber = keyof BrickColorsByNumber> {
/**
* **DO NOT USE!**
*
* This field exists to force TypeScript to recognize this as a nominal type
* @hidden
* @deprecated
*/
readonly _nominal_BrickColor: unique symbol;
/** The unique number that identifies the BrickColor */
readonly Number: T;
/** The name associated with the BrickColor */
readonly Name: BrickColorsByNumber[T];
/** The Color3 associated with the BrickColor */
readonly Color: Color3;
/** The red component (between 0 and 1) */
readonly r: number;
/** The green component (between 0 and 1) */
readonly g: number;
/** The blue component (between 0 and 1) */
readonly b: number;
}
interface BrickColorsByNumber {
1: "White";
2: "Grey";
3: "Light yellow";
5: "Brick yellow";
6: "Light green (Mint)";
9: "Light reddish violet";
11: "Pastel Blue";
12: "Light orange brown";
18: "Nougat";
21: "Bright red";
22: "Med. reddish violet";
23: "Bright blue";
24: "Bright yellow";
25: "Earth orange";
26: "Black";
27: "Dark grey";
28: "Dark green";
29: "Medium green";
36: "Lig. Yellowich orange";
37: "Bright green";
38: "Dark orange";
39: "Light bluish violet";
40: "Transparent";
41: "Tr. Red";
42: "Tr. Lg blue";
43: "Tr. Blue";
44: "Tr. Yellow";
45: "Light blue";
47: "Tr. Flu. Reddish orange";
48: "Tr. Green";
49: "Tr. Flu. Green";
50: "Phosph. White";
100: "Light red";
101: "Medium red";
102: "Medium blue";
103: "Light grey";
104: "Bright violet";
105: "Br. yellowish orange";
106: "Bright orange";
107: "Bright bluish green";
108: "Earth yellow";
110: "Bright bluish violet";
111: "Tr. Brown";
112: "Medium bluish violet";
113: "Tr. Medi. reddish violet";
115: "Med. yellowish green";
116: "Med. bluish green";
118: "Light bluish green";
119: "Br. yellowish green";
120: "Lig. yellowish green";
121: "Med. yellowish orange";
123: "Br. reddish orange";
124: "Bright reddish violet";
125: "Light orange";
126: "Tr. Bright bluish violet";
127: "Gold";
128: "Dark nougat";
131: "Silver";
133: "Neon orange";
134: "Neon green";
135: "Sand blue";
136: "Sand violet";
137: "Medium orange";
138: "Sand yellow";
140: "Earth blue";
141: "Earth green";
143: "Tr. Flu. Blue";
145: "Sand blue metallic";
146: "Sand violet metallic";
147: "Sand yellow metallic";
148: "Dark grey metallic";
149: "Black metallic";
150: "Light grey metallic";
151: "Sand green";
153: "Sand red";
154: "Dark red";
157: "Tr. Flu. Yellow";
158: "Tr. Flu. Red";
168: "Gun metallic";
176: "Red flip/flop";
178: "Yellow flip/flop";
179: "Silver flip/flop";
180: "Curry";
190: "Fire Yellow";
191: "Flame yellowish orange";
192: "Reddish brown";
193: "Flame reddish orange";
194: "Medium stone grey";
195: "Royal blue";
196: "Dark Royal blue";
198: "Bright reddish lilac";
199: "Dark stone grey";
200: "Lemon metalic";
208: "Light stone grey";
209: "Dark Curry";
210: "Faded green";
211: "Turquoise";
212: "Light Royal blue";
213: "Medium Royal blue";
216: "Rust";
217: "Brown";
218: "Reddish lilac";
219: "Lilac";
220: "Light lilac";
221: "Bright purple";
222: "Light purple";
223: "Light pink";
224: "Light brick yellow";
225: "Warm yellowish orange";
226: "Cool yellow";
232: "Dove blue";
268: "Medium lilac";
301: "Slime green";
302: "Smoky grey";
303: "Dark blue";
304: "Parsley green";
305: "Steel blue";
306: "Storm blue";
307: "Lapis";
308: "Dark indigo";
309: "Sea green";
310: "Shamrock";
311: "Fossil";
312: "Mulberry";
313: "Forest green";
314: "Cadet blue";
315: "Electric blue";
316: "Eggplant";
317: "Moss";
318: "Artichoke";
319: "Sage green";
320: "Ghost grey";
321: "Lilac";
322: "Plum";
323: "Olivine";
324: "Laurel green";
325: "Quill grey";
327: "Crimson";
328: "Mint";
329: "Baby blue";
330: "Carnation pink";
331: "Persimmon";
332: "Maroon";
333: "Gold";
334: "Daisy orange";
335: "Pearl";
336: "Fog";
337: "Salmon";
338: "Terra Cotta";
339: "Cocoa";
340: "Wheat";
341: "Buttermilk";
342: "Mauve";
343: "Sunrise";
344: "Tawny";
345: "Rust";
346: "Cashmere";
347: "Khaki";
348: "Lily white";
349: "Seashell";
350: "Burgundy";
351: "Cork";
352: "Burlap";
353: "Beige";
354: "Oyster";
355: "Pine Cone";
356: "Fawn brown";
357: "Hurricane grey";
358: "Cloudy grey";
359: "Linen";
360: "Copper";
361: "Dirt brown";
362: "Bronze";
363: "Flint";
364: "Dark taupe";
365: "Burnt Sienna";
1001: "Institutional white";
1002: "Mid gray";
1003: "Really black";
1004: "Really red";
1005: "Deep orange";
1006: "Alder";
1007: "Dusty Rose";
1008: "Olive";
1009: "New Yeller";
1010: "Really blue";
1011: "Navy blue";
1012: "Deep blue";
1013: "Cyan";
1014: "CGA brown";
1015: "Magenta";
1016: "Pink";
1017: "Deep orange";
1018: "Teal";
1019: "Toothpaste";
1020: "Lime green";
1021: "Camo";
1022: "Grime";
1023: "Lavender";
1024: "Pastel light blue";
1025: "Pastel orange";
1026: "Pastel violet";
1027: "Pastel blue-green";
1028: "Pastel green";
1029: "Pastel yellow";
1030: "Pastel brown";
1031: "Royal purple";
1032: "Hot pink";
}
interface BrickColorsByPalette {
0: 141;
1: 301;
2: 107;
3: 26;
4: 1012;
5: 303;
6: 1011;
7: 304;
8: 28;
9: 1018;
10: 302;
11: 305;
12: 306;
13: 307;
14: 308;
15: 1021;
16: 309;
17: 310;
18: 1019;
19: 135;
20: 102;
21: 23;
22: 1010;
23: 312;
24: 313;
25: 37;
26: 1022;
27: 1020;
28: 1027;
29: 311;
30: 315;
31: 1023;
32: 1031;
33: 316;
34: 151;
35: 317;
36: 318;
37: 319;
38: 1024;
39: 314;
40: 1013;
41: 1006;
42: 321;
43: 322;
44: 104;
45: 1008;
46: 119;
47: 323;
48: 324;
49: 325;
50: 320;
51: 11;
52: 1026;
53: 1016;
54: 1032;
55: 1015;
56: 327;
57: 1005;
58: 1009;
59: 29;
60: 328;
61: 1028;
62: 208;
63: 45;
64: 329;
65: 330;
66: 331;
67: 1004;
68: 21;
69: 332;
70: 333;
71: 24;
72: 334;
73: 226;
74: 1029;
75: 335;
76: 336;
77: 342;
78: 343;
79: 338;
80: 1007;
81: 339;
82: 133;
83: 106;
84: 340;
85: 341;
86: 1001;
87: 1;
88: 9;
89: 1025;
90: 337;
91: 344;
92: 345;
93: 1014;
94: 105;
95: 346;
96: 347;
97: 348;
98: 349;
99: 1030;
100: 125;
101: 101;
102: 350;
103: 192;
104: 351;
105: 352;
106: 353;
107: 354;
108: 1002;
109: 5;
110: 18;
111: 217;
112: 355;
113: 356;
114: 153;
115: 357;
116: 358;
117: 359;
118: 360;
119: 38;
120: 361;
121: 362;
122: 199;
123: 194;
124: 363;
125: 364;
126: 365;
127: 1003;
}
interface BrickColorConstructor {
/** Returns a random BrickColor. */
random: () => BrickColor;
/** Returns a White BrickColor */
White: () => BrickColor<1>;
/** Returns a Gray BrickColor */
Gray: () => BrickColor<194>;
/** Returns a DarkGray BrickColor */
DarkGray: () => BrickColor<199>;
/** Returns a Black BrickColor */
Black: () => BrickColor<26>;
/** Returns a Red BrickColor */
Red: () => BrickColor<21>;
/** Returns a Yellow BrickColor */
Yellow: () => BrickColor<24>;
/** Returns a Green BrickColor */
Green: () => BrickColor<28>;
/** Returns a Blue BrickColor */
Blue: () => BrickColor<23>;
/** Constructs a BrickColor from its name. */
new <T extends BrickColorsByNumber[keyof BrickColorsByNumber]>(
val: T,
): BrickColor<
{ [K in keyof BrickColorsByNumber]: T extends BrickColorsByNumber[K] ? K : never }[keyof BrickColorsByNumber]
>;
/** Constructs a BrickColor from its numerical index. */
new <T extends keyof BrickColorsByNumber>(val: T): BrickColor<T>;
/** Constructs a BrickColor from its numerical index. */
new (val: number): BrickColor;
/** Constructs the closest BrickColor that can be matched to the specified RGB components. */
new (r: number, g: number, b: number): BrickColor;
/** Constructs the closest BrickColor that can be matched to the specified Color3. */
new (color: Color3): BrickColor;
/** Constructs a BrickColor from its palette index. */
palette<T extends keyof BrickColorsByPalette>(this: void, paletteValue: T): BrickColor<BrickColorsByPalette[T]>;
palette(this: void, paletteValue: number): BrickColor;
}
declare const BrickColor: BrickColorConstructor;
// CatalogSearchParams
interface CatalogSearchParams {
/**
* **DO NOT USE!**
*
* This field exists to force TypeScript to recognize this as a nominal type
* @hidden
* @deprecated
*/
readonly _nominal_CatalogSearchParams: unique symbol;
/** The keyword to search for catalog results with. */
SearchKeyword: string;
/** The minimum item price to search for. */
MinPrice: number;
/** The maximum item price to search for. */
MaxPrice: number;
/** The order in which to sort the results. */
SortType: Enum.CatalogSortType;
/** The time period to use to aggregate the sort results. */
SortAggregation: Enum.CatalogSortAggregation;
/** The category to filter the search by. */
CategoryFilter: Enum.CatalogCategoryFilter;
/** The sales type filter the search by. */
SalesTypeFilter: Enum.SalesTypeFilter;
/** An array containing BundleType values to filter the search by. */
BundleTypes: ReadonlyArray<Enum.BundleType>;
/** An array containing AvatarAssetType values to filter the search by. */
AssetTypes: ReadonlyArray<Enum.AvatarAssetType>;
/** Whether off sale items should be included in the results. */
IncludeOffSale: boolean;
/** Search for items with the given creator. */
CreatorName: string;
}
interface CatalogSearchParamsConstructor {
new (): CatalogSearchParams;
}
declare const CatalogSearchParams: CatalogSearchParamsConstructor;
// CFrame
interface CFrame {
/**
* **DO NOT USE!**
*
* This field exists to force TypeScript to recognize this as a nominal type
* @hidden
* @deprecated
*/
readonly _nominal_CFrame: unique symbol;
/** The 3D position of the CFrame */
readonly Position: Vector3;
/** A copy of the CFrame with no translation. */
readonly Rotation: CFrame;
/** The x-coordinate of the position */
readonly X: number;
/** The y-coordinate of the position */
readonly Y: number;
/** The z-coordinate of the position */
readonly Z: number;
/** The forward-direction component of the CFrame’s orientation. */
readonly LookVector: Vector3;
/** The right-direction component of the CFrame’s orientation. */
readonly RightVector: Vector3;
/** The up-direction component of the CFrame’s orientation. */
readonly UpVector: Vector3;
/** Equivalent to the first/top row of the rotation matrix, or `Vector3.new(r00, r10, r20)` */
readonly XVector: Vector3;
/** Equivalent to the second/middle row of the rotation matrix, or `Vector3.new(r01, r11, r21)` */
readonly YVector: Vector3;
/** Equivalent to the third/bottom row of the rotation matrix, or `Vector3.new(r02, r12, r22)` */
readonly ZVector: Vector3;
/** Returns the inverse of this CFrame */
Inverse(this: CFrame): CFrame;
/** Returns a CFrame interpolated between this CFrame and the goal by the fraction alpha */
Lerp(this: CFrame, goal: CFrame, alpha: number): CFrame;
/**
* Returns an orthonormalized copy of the CFrame. The BasePart.CFrame property automatically applies orthonormalization,
* but other APIs which take CFrames do not, so this method is occasionally necessary when incrementally updating a CFrame and using it with them.
*/
Orthonormalize(this: CFrame): CFrame;
/** Returns a CFrame transformed from Object to World space. Equivalent to `[CFrame * cf]` */
ToWorldSpace(this: CFrame, cf: CFrame): CFrame;
/** Returns a CFrame transformed from World to Object space. Equivalent to `[CFrame:inverse() * cf]` */
ToObjectSpace(this: CFrame, cf: CFrame): CFrame;
/** Returns a Vector3 transformed from Object to World space. Equivalent to `[CFrame * v3]` */
PointToWorldSpace(this: CFrame, v3: Vector3): Vector3;
/** Returns a Vector3 transformed from World to Object space. Equivalent to `[CFrame:inverse() * v3]` */
PointToObjectSpace(this: CFrame, v3: Vector3): Vector3;
/** Returns a Vector3 rotated from Object to World space. Equivalent to `[(CFrame - CFrame.p) *v3]` */
VectorToWorldSpace(this: CFrame, v3: Vector3): Vector3;
/** Returns a Vector3 rotated from World to Object space. Equivalent to `[(CFrame:inverse() - CFrame:inverse().p) * v3]` */
VectorToObjectSpace(this: CFrame, v3: Vector3): Vector3;
/** Returns the values: x, y, z, R00, R01, R02, R10, R11, R12, R20, R21, R22, where R00-R22 represent the 3x3 rotation matrix of the CFrame, and xyz represent the position of the CFrame. */
GetComponents(
this: CFrame,
): LuaTuple<[number, number, number, number, number, number, number, number, number, number, number, number]>;
/** Returns approximate angles that could be used to generate CFrame, if angles were applied in Z, Y, X order */
ToEulerAnglesXYZ(this: CFrame): LuaTuple<[number, number, number]>;
/** Returns approximate angles that could be used to generate CFrame, if angles were applied in Z, X, Y order */
ToEulerAnglesYXZ(this: CFrame): LuaTuple<[number, number, number]>;
/** Returns approximate angles that could be used to generate CFrame, if angles were applied in Z, X, Y order (Equivalent to toEulerAnglesYXZ) */
ToOrientation(this: CFrame): LuaTuple<[number, number, number]>;
/** Returns a tuple of a Vector3 and a number which represent the rotation of the CFrame in the axis-angle representation */
ToAxisAngle(this: CFrame): LuaTuple<[Vector3, number]>;
}
interface CFrameConstructor {
/**
* An identity CFrame, one with no translation or rotation.
*
* This API member is a **constant**, and must be accessed through the `CFrame` global as opposed to an individual
* `CFrame` object.
*
* ```lua
* print(CFrame.identity) --> 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1
* ```
*/
readonly identity: CFrame;
/** Equivalent to fromEulerAnglesXYZ */
Angles: (rX: number, rY: number, rZ: number) => CFrame;
/** Creates a rotated CFrame from a Unit Vector3 and a rotation in radians */
fromAxisAngle: (unit: Vector3, rotation: number) => CFrame;
/** Creates a rotated CFrame using angles (rx, ry, rz) in radians. Rotations are applied in Z, Y, X order. */
fromEulerAnglesXYZ: (rX: number, rY: number, rZ: number) => CFrame;
/** Creates a rotated CFrame using angles (rx, ry, rz) in radians. Rotations are applied in Z, X, Y order. */
fromEulerAnglesYXZ: (rX: number, rY: number, rZ: number) => CFrame;
/** Creates a CFrame from a translation and the columns of a rotation matrix. If vz is excluded,
* the third column is calculated as `[vx:Cross(vy).Unit]`.
*/
fromMatrix: (pos: Vector3, vX: Vector3, vY: Vector3, vZ?: Vector3) => CFrame;
/** Equivalent to fromEulerAnglesYXZ */
fromOrientation: (rX: number, rY: number, rZ: number) => CFrame;
/**
* Creates a new CFrame located at `at` and facing towards `lookAt`, optionally specifying the upward direction (by default, (0, 1, 0)).
*
* This function replaces the `CFrame.new(Vector3, Vector3)` constructor which accomplished a similar task. This function allows you to specify the `up` Vector, using the same default as the old constructor.
*/
lookAt: (at: Vector3, lookAt: Vector3, up?: Vector3) => CFrame;
/**
* Returns a new CFrame with the position of `at` and facing along `direction`, optionally specifying the upward direction (`up`) with a default of `(0, 1, 0)`.
*
* This constructor is equivalent to `CFrame.lookAt(at, at + direction)`.
*/
lookAlong: (at: Vector3, direction: Vector3, up?: Vector3) => CFrame;
/** Creates a CFrame from a Vector3 */
new (pos: Vector3): CFrame;
/** Creates a CFrame from position (x, y, z). */
new (x: number, y: number, z: number): CFrame;
/** Creates a blank identity CFrame. */
new (): CFrame;
/** Creates a CFrame from position (x, y, z) and quaternion (qX, qY, qZ, qW) */
new (x: number, y: number, z: number, qX: number, qY: number, qZ: number, qW: number): CFrame;
/** Creates a CFrame from position (x, y, z) with an orientation specified by the rotation matrix `[[R00 R01 R02] [R10 R11 R12] [R20 R21 R22]]` */
new (
x: number,
y: number,
z: number,
R00: number,
R01: number,
R02: number,
R10: number,
R11: number,
R12: number,
R20: number,
R21: number,
R22: number,
): CFrame;
/** Creates a CFrame located at pos with it’s lookVector pointing towards the lookAt position. */
new (pos: Vector3, lookAt: Vector3): CFrame;
}
declare const CFrame: CFrameConstructor;
interface ClipEvaluator {
/**
* **DO NOT USE!**
*
* This field exists to force TypeScript to recognize this as a nominal type
* @hidden
* @deprecated
*/
readonly _nominal_ClipEvaluator: unique symbol;
}
interface Color3 {
/**
* **DO NOT USE!**
*
* This field exists to force TypeScript to recognize this as a nominal type
* @hidden
* @deprecated
*/
readonly _nominal_Color3: unique symbol;
/** The red value of the color (between 0 and 1) */
readonly R: number;
/** The green value of the color (between 0 and 1) */
readonly G: number;
/** The blue value of the color (between 0 and 1) */
readonly B: number;
/** Returns a Color3 interpolated between two Color3 objects. Alpha is a number from 0 to 1. */
Lerp(this: Color3, goal: Color3, alpha: number): Color3;
/** Returns the [hue, saturation, and value](https://en.wikipedia.org/wiki/HSL_and_HSV) of a Color3. This function is the inverse operation of the `Color3.fromHSV` constructor. */
ToHSV(this: Color3): LuaTuple<[number, number, number]>;
/**
* Converts the color to a six-character hexadecimal string representing the color in the format RRGGBB. It is not
* prefixed with an octothorpe (#), although this can be concatenated easily.
*
* The returned string can be provided to `Color3.fromHex` to produce the original color.
* ```lua
* print(Color3.new(0, 1, 0):ToHex()) --> "00FF00"
* print(BrickColor.new("Really red").Color:ToHex()) --> "FF0000"
* ```
*/
ToHex(this: Color3): string;
}
interface Color3Constructor {
/** Creates a Color3 with the given red, green, and blue. The numbers can range from 0 to 255. */
fromRGB: (r?: number, g?: number, b?: number) => Color3;
/** Creates a Color3 with the given hue, saturation, and value. The numbers can range from 0 to 1. */
fromHSV: (hue: number, sat: number, val: number) => Color3;
/** Returns the hue, saturation, and value of a Color3. */
toHSV: (color: Color3) => LuaTuple<[number, number, number]>;
/**
* Returns a new Color3 from a six- or three-character [hexadecimal](https://en.wikipedia.org/wiki/Hexadecimal)
* format. A preceding octothorpe (#) is ignored, if present. This function interprets the given string as a typical
* web hex color in the format RRGGBB or RGB (shorthand for RRGGBB). For example, #FFAA00 produces an orange color,
* and is the same as #FA0.
*
* The color returned can be converted back into hex using `Color3:toHex`, although it is not guaranteed to return
* the exact same string as passed to this function.
* ```lua
* print(Color3.fromHex("#FF0000")) --> 1, 0, 0
* ```
*/
fromHex: (hex: string) => Color3;
/** Returns a Color3 with the given red, green, and blue values. The numbers can range from 0 to 1, defaulting to 0 */
new (red?: number, green?: number, blue?: number): Color3;
}
declare const Color3: Color3Constructor;
// ColorSequence
interface ColorSequence {
/**
* **DO NOT USE!**
*
* This field exists to force TypeScript to recognize this as a nominal type
* @hidden
* @deprecated
*/
readonly _nominal_ColorSequence: unique symbol;
readonly Keypoints: ReadonlyArray<ColorSequenceKeypoint>;
}
interface ColorSequenceConstructor {
new (color: Color3): ColorSequence;
new (c0: Color3, c1: Color3): ColorSequence;
new (colors: ReadonlyArray<ColorSequenceKeypoint>): ColorSequence;
}
declare const ColorSequence: ColorSequenceConstructor;
// ColorSequenceKeypoint
interface ColorSequenceKeypoint {
/**
* **DO NOT USE!**
*
* This field exists to force TypeScript to recognize this as a nominal type
* @hidden
* @deprecated
*/
readonly _nominal_ColorSequenceKeypoint: unique symbol;
readonly Time: number;
readonly Value: Color3;
}
type ColorSequenceKeypointConstructor = new (time: number, color: Color3) => ColorSequenceKeypoint;
declare const ColorSequenceKeypoint: ColorSequenceKeypointConstructor;
/**
* Describes a time value, returned from many of DateTime's methods and used for some of DateTime's constructors
*/
interface TimeValueTable {
/** Range: 1400-9999 */
Year: number;
/** Range: 1-12 */
Month: number;
/** Range: 1-31 */
Day: number;
/** Range: 0-23 */
Hour: number;
/** Range: 0-59 */
Minute: number;
/**
* Range: 0-60
* Usually 0–59, sometimes 60 to accommodate leap seconds in certain systems.
*/
Second: number;
/** Range: 0-999 */
Millisecond: number;
}
/**
* A DateTime represents a moment in time using a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time).
* It can be used to easily format dates and times in specific locales.
* When converted to a string, a string conversion of the stored timestamp integer is returned.
* They do not store timezone values; rather, timezones are considered when constructing and using DateTime objects.
* DateTime objects are equal if and only if their `UnixTimestampMillis` properties are equal.
*/
interface DateTime {
/**
* **DO NOT USE!**
*
* This field exists to force TypeScript to recognize this as a nominal type
* @hidden
* @deprecated
*/
readonly _nominal_DateTime: unique symbol;
/**
* The number of seconds since January 1st, 1970 at 00:00 UTC (the Unix epoch).
* For more information, see [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time).
* Range is -17,987,443,200–253,402,300,799, approximately years 1400–9999.
*/
readonly UnixTimestamp: number;
/**
* The number of milliseconds since January 1st, 1970 at 00:00 UTC (the Unix epoch).
* For more information, see [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time).
* Range is -17,987,443,200,000 to 253,402,300,799,999, approximately years 1400–9999.
*/
readonly UnixTimestampMillis: number;
/** Converts the value of this DateTime object to Universal Coordinated Time (UTC) */
ToUniversalTime(this: DateTime): TimeValueTable;
/** Converts the value of this DateTime object to local time */
ToLocalTime(this: DateTime): TimeValueTable;
/**
* Formats a date as a [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time string.
* An example ISO 8601 date-time string would be `2020-01-02T10:30:45Z`, which represents January 2nd 2020 at 10:30 AM, 45 seconds.
*/
ToIsoDate(this: DateTime): string;
/**
* Generates a string from the DateTime value interpreted as Universal Coordinated Time (UTC) and a format string.
* The format string should contain tokens, which will replace to certain date/time values described by the DateTime object.
* For details on all the available tokens, see [DateTime Format Strings](https://developer.roblox.com/articles/datetime-format-strings).
* @param format
* @param locale
*/
FormatUniversalTime(this: DateTime, format: string, locale: string): string;
/**
* Generates a string from the DateTime value interpreted as local time and a format string.
* The format string should contain tokens, which will replace to certain date/time values described by the DateTime object.
* For details on all the available tokens, see [DateTime Format Strings](