@rbxts/types 1.0.793 → 1.0.795
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.
|
@@ -30,6 +30,7 @@ interface Services {
|
|
|
30
30
|
CaptureService: CaptureService;
|
|
31
31
|
Chat: Chat;
|
|
32
32
|
ChatbotUIService: ChatbotUIService;
|
|
33
|
+
CloudCRUDService: CloudCRUDService;
|
|
33
34
|
CollaboratorsService: CollaboratorsService;
|
|
34
35
|
CollectionService: CollectionService;
|
|
35
36
|
CommandService: CommandService;
|
|
@@ -51,7 +52,6 @@ interface Services {
|
|
|
51
52
|
DebuggerUIService: DebuggerUIService;
|
|
52
53
|
DeviceIdService: DeviceIdService;
|
|
53
54
|
DraggerService: DraggerService;
|
|
54
|
-
EngineAPICloudProcessingService: EngineAPICloudProcessingService;
|
|
55
55
|
EventIngestService: EventIngestService;
|
|
56
56
|
ExampleService: ExampleService;
|
|
57
57
|
ExperienceAuthService: ExperienceAuthService;
|
|
@@ -1655,6 +1655,7 @@ interface AnalyticsService extends Instance {
|
|
|
1655
1655
|
statistics?: { [index: string]: number },
|
|
1656
1656
|
customData?: unknown,
|
|
1657
1657
|
): void;
|
|
1658
|
+
LogCustomEvent(this: AnalyticsService, player: Player, eventName: string, value?: number, customFields?: object): void;
|
|
1658
1659
|
LogEconomyEvent(this: AnalyticsService, player: Player, flowType: CastsToEnum<Enum.AnalyticsEconomyFlowType>, currencyType: string, amount: number, endingBalance: number, transactionType: string, itemSku?: string, customFields?: object): void;
|
|
1659
1660
|
LogFunnelStepEvent(this: AnalyticsService, player: Player, funnelName: string, funnelSessionId?: string, step?: number, stepName?: string, customFields?: object): void;
|
|
1660
1661
|
LogOnboardingFunnelStepEvent(this: AnalyticsService, player: Player, step: number, stepName?: string, customFields?: object): void;
|
|
@@ -2856,7 +2857,8 @@ interface AudioAnalyzer extends Instance {
|
|
|
2856
2857
|
* Tags: NotReplicated
|
|
2857
2858
|
*/
|
|
2858
2859
|
readonly RmsLevel: number;
|
|
2859
|
-
|
|
2860
|
+
SpectrumEnabled: boolean;
|
|
2861
|
+
GetConnectedWires(this: AudioAnalyzer, pin: string): Array<Instance>;
|
|
2860
2862
|
/**
|
|
2861
2863
|
* Tags: CustomLuaState
|
|
2862
2864
|
*/
|
|
@@ -2876,7 +2878,7 @@ interface AudioChorus extends Instance {
|
|
|
2876
2878
|
Depth: number;
|
|
2877
2879
|
Mix: number;
|
|
2878
2880
|
Rate: number;
|
|
2879
|
-
GetConnectedWires(this: AudioChorus, pin: string):
|
|
2881
|
+
GetConnectedWires(this: AudioChorus, pin: string): Array<Instance>;
|
|
2880
2882
|
}
|
|
2881
2883
|
|
|
2882
2884
|
interface AudioCompressor extends Instance {
|
|
@@ -2894,7 +2896,7 @@ interface AudioCompressor extends Instance {
|
|
|
2894
2896
|
Ratio: number;
|
|
2895
2897
|
Release: number;
|
|
2896
2898
|
Threshold: number;
|
|
2897
|
-
GetConnectedWires(this: AudioCompressor, pin: string):
|
|
2899
|
+
GetConnectedWires(this: AudioCompressor, pin: string): Array<Instance>;
|
|
2898
2900
|
}
|
|
2899
2901
|
|
|
2900
2902
|
interface AudioDeviceInput extends Instance {
|
|
@@ -2911,7 +2913,7 @@ interface AudioDeviceInput extends Instance {
|
|
|
2911
2913
|
Muted: boolean;
|
|
2912
2914
|
Player: Player | undefined;
|
|
2913
2915
|
Volume: number;
|
|
2914
|
-
GetConnectedWires(this: AudioDeviceInput, pin: string):
|
|
2916
|
+
GetConnectedWires(this: AudioDeviceInput, pin: string): Array<Instance>;
|
|
2915
2917
|
GetUserIdAccessList(this: AudioDeviceInput): unknown;
|
|
2916
2918
|
SetUserIdAccessList(this: AudioDeviceInput, userIds: Array<any>): void;
|
|
2917
2919
|
}
|
|
@@ -2926,7 +2928,7 @@ interface AudioDeviceOutput extends Instance {
|
|
|
2926
2928
|
*/
|
|
2927
2929
|
readonly _nominal_AudioDeviceOutput: unique symbol;
|
|
2928
2930
|
Player: Player | undefined;
|
|
2929
|
-
GetConnectedWires(this: AudioDeviceOutput, pin: string):
|
|
2931
|
+
GetConnectedWires(this: AudioDeviceOutput, pin: string): Array<Instance>;
|
|
2930
2932
|
}
|
|
2931
2933
|
|
|
2932
2934
|
interface AudioDistortion extends Instance {
|
|
@@ -2940,7 +2942,7 @@ interface AudioDistortion extends Instance {
|
|
|
2940
2942
|
readonly _nominal_AudioDistortion: unique symbol;
|
|
2941
2943
|
Bypass: boolean;
|
|
2942
2944
|
Level: number;
|
|
2943
|
-
GetConnectedWires(this: AudioDistortion, pin: string):
|
|
2945
|
+
GetConnectedWires(this: AudioDistortion, pin: string): Array<Instance>;
|
|
2944
2946
|
}
|
|
2945
2947
|
|
|
2946
2948
|
interface AudioEcho extends Instance {
|
|
@@ -2957,7 +2959,7 @@ interface AudioEcho extends Instance {
|
|
|
2957
2959
|
DryLevel: number;
|
|
2958
2960
|
Feedback: number;
|
|
2959
2961
|
WetLevel: number;
|
|
2960
|
-
GetConnectedWires(this: AudioEcho, pin: string):
|
|
2962
|
+
GetConnectedWires(this: AudioEcho, pin: string): Array<Instance>;
|
|
2961
2963
|
}
|
|
2962
2964
|
|
|
2963
2965
|
interface AudioEmitter extends Instance {
|
|
@@ -2970,12 +2972,12 @@ interface AudioEmitter extends Instance {
|
|
|
2970
2972
|
*/
|
|
2971
2973
|
readonly _nominal_AudioEmitter: unique symbol;
|
|
2972
2974
|
AudioInteractionGroup: string;
|
|
2973
|
-
GetConnectedWires(this: AudioEmitter, pin: string):
|
|
2975
|
+
GetConnectedWires(this: AudioEmitter, pin: string): Array<Instance>;
|
|
2974
2976
|
/**
|
|
2975
2977
|
* Tags: CustomLuaState
|
|
2976
2978
|
*/
|
|
2977
2979
|
GetDistanceAttenuation(this: AudioEmitter): object;
|
|
2978
|
-
GetInteractingListeners(this: AudioEmitter):
|
|
2980
|
+
GetInteractingListeners(this: AudioEmitter): Array<Instance>;
|
|
2979
2981
|
/**
|
|
2980
2982
|
* Tags: CustomLuaState
|
|
2981
2983
|
*/
|
|
@@ -2996,7 +2998,7 @@ interface AudioEqualizer extends Instance {
|
|
|
2996
2998
|
LowGain: number;
|
|
2997
2999
|
MidGain: number;
|
|
2998
3000
|
MidRange: NumberRange;
|
|
2999
|
-
GetConnectedWires(this: AudioEqualizer, pin: string):
|
|
3001
|
+
GetConnectedWires(this: AudioEqualizer, pin: string): Array<Instance>;
|
|
3000
3002
|
}
|
|
3001
3003
|
|
|
3002
3004
|
interface AudioFader extends Instance {
|
|
@@ -3010,7 +3012,7 @@ interface AudioFader extends Instance {
|
|
|
3010
3012
|
readonly _nominal_AudioFader: unique symbol;
|
|
3011
3013
|
Bypass: boolean;
|
|
3012
3014
|
Volume: number;
|
|
3013
|
-
GetConnectedWires(this: AudioFader, pin: string):
|
|
3015
|
+
GetConnectedWires(this: AudioFader, pin: string): Array<Instance>;
|
|
3014
3016
|
}
|
|
3015
3017
|
|
|
3016
3018
|
interface AudioFilter extends Instance {
|
|
@@ -3027,7 +3029,7 @@ interface AudioFilter extends Instance {
|
|
|
3027
3029
|
Frequency: number;
|
|
3028
3030
|
Gain: number;
|
|
3029
3031
|
Q: number;
|
|
3030
|
-
GetConnectedWires(this: AudioFilter, pin: string):
|
|
3032
|
+
GetConnectedWires(this: AudioFilter, pin: string): Array<Instance>;
|
|
3031
3033
|
GetGainAt(this: AudioFilter, frequency: number): number;
|
|
3032
3034
|
}
|
|
3033
3035
|
|
|
@@ -3044,7 +3046,7 @@ interface AudioFlanger extends Instance {
|
|
|
3044
3046
|
Depth: number;
|
|
3045
3047
|
Mix: number;
|
|
3046
3048
|
Rate: number;
|
|
3047
|
-
GetConnectedWires(this: AudioFlanger, pin: string):
|
|
3049
|
+
GetConnectedWires(this: AudioFlanger, pin: string): Array<Instance>;
|
|
3048
3050
|
}
|
|
3049
3051
|
|
|
3050
3052
|
interface AudioFocusService extends Instance {
|
|
@@ -3068,8 +3070,8 @@ interface AudioListener extends Instance {
|
|
|
3068
3070
|
*/
|
|
3069
3071
|
readonly _nominal_AudioListener: unique symbol;
|
|
3070
3072
|
AudioInteractionGroup: string;
|
|
3071
|
-
GetConnectedWires(this: AudioListener, pin: string):
|
|
3072
|
-
GetInteractingEmitters(this: AudioListener):
|
|
3073
|
+
GetConnectedWires(this: AudioListener, pin: string): Array<Instance>;
|
|
3074
|
+
GetInteractingEmitters(this: AudioListener): Array<Instance>;
|
|
3073
3075
|
}
|
|
3074
3076
|
|
|
3075
3077
|
interface AudioPitchShifter extends Instance {
|
|
@@ -3083,7 +3085,7 @@ interface AudioPitchShifter extends Instance {
|
|
|
3083
3085
|
readonly _nominal_AudioPitchShifter: unique symbol;
|
|
3084
3086
|
Bypass: boolean;
|
|
3085
3087
|
Pitch: number;
|
|
3086
|
-
GetConnectedWires(this: AudioPitchShifter, pin: string):
|
|
3088
|
+
GetConnectedWires(this: AudioPitchShifter, pin: string): Array<Instance>;
|
|
3087
3089
|
}
|
|
3088
3090
|
|
|
3089
3091
|
interface AudioPlayer extends Instance {
|
|
@@ -3112,7 +3114,7 @@ interface AudioPlayer extends Instance {
|
|
|
3112
3114
|
readonly TimeLength: number;
|
|
3113
3115
|
TimePosition: number;
|
|
3114
3116
|
Volume: number;
|
|
3115
|
-
GetConnectedWires(this: AudioPlayer, pin: string):
|
|
3117
|
+
GetConnectedWires(this: AudioPlayer, pin: string): Array<Instance>;
|
|
3116
3118
|
Play(this: AudioPlayer): void;
|
|
3117
3119
|
Stop(this: AudioPlayer): void;
|
|
3118
3120
|
readonly Ended: RBXScriptSignal<() => void>;
|
|
@@ -3141,7 +3143,7 @@ interface AudioReverb extends Instance {
|
|
|
3141
3143
|
LowShelfGain: number;
|
|
3142
3144
|
ReferenceFrequency: number;
|
|
3143
3145
|
WetLevel: number;
|
|
3144
|
-
GetConnectedWires(this: AudioReverb, pin: string):
|
|
3146
|
+
GetConnectedWires(this: AudioReverb, pin: string): Array<Instance>;
|
|
3145
3147
|
}
|
|
3146
3148
|
|
|
3147
3149
|
interface AudioSearchParams extends Instance {
|
|
@@ -7539,6 +7541,17 @@ interface DragDetector extends ClickDetector {
|
|
|
7539
7541
|
readonly DragStartReplicate: RBXScriptSignal<(playerWhoDragged: Player, cursorRay: Ray, viewFrame: CFrame, hitFrame: CFrame, clickedPart: BasePart, vrInputFrame: CFrame | undefined, isModeSwitchKeyDown: boolean) => void>;
|
|
7540
7542
|
}
|
|
7541
7543
|
|
|
7544
|
+
interface CloudCRUDService extends Instance {
|
|
7545
|
+
/**
|
|
7546
|
+
* **DO NOT USE!**
|
|
7547
|
+
*
|
|
7548
|
+
* This field exists to force TypeScript to recognize this as a nominal type
|
|
7549
|
+
* @hidden
|
|
7550
|
+
* @deprecated
|
|
7551
|
+
*/
|
|
7552
|
+
readonly _nominal_CloudCRUDService: unique symbol;
|
|
7553
|
+
}
|
|
7554
|
+
|
|
7542
7555
|
/** The **Clouds** object renders realistic clouds that drift slowly across the sky. Both cloud cover and density can be adjusted, as well as cloud color to achieve atmospheres like stormy skies, moody sunsets, alien worlds, etc.
|
|
7543
7556
|
*
|
|
7544
7557
|
* See the [Dynamic Clouds](https://developer.roblox.com/articles/dynamic-clouds) article for a summary of properties and expected results.
|
|
@@ -7663,6 +7676,8 @@ interface CollectionService extends Instance {
|
|
|
7663
7676
|
* AddTag will apply a tag to an object. This method will not throw an error if the object already had the tag. Successfully adding a tag will fire a signal created by [CollectionService:GetInstanceAddedSignal](https://developer.roblox.com/en-us/api-reference/function/CollectionService/GetInstanceAddedSignal) with the given tag.
|
|
7664
7677
|
*
|
|
7665
7678
|
* **Warning:** When tagging an object, it is common that some resources are used to give the tag its functionality, e.g. event connections or tables. To prevent memory leaks, it is a good idea to clean these up (disconnect, set to nil, etc) when no longer needed for a tag. Do this when calling [CollectionService:RemoveTag](https://developer.roblox.com/en-us/api-reference/function/CollectionService/RemoveTag), calling [Instance:Destroy](https://developer.roblox.com/en-us/api-reference/function/Instance/Destroy) or in a function connected to a signal returned by [CollectionService:GetInstanceRemovedSignal](https://developer.roblox.com/en-us/api-reference/function/CollectionService/GetInstanceRemovedSignal).
|
|
7679
|
+
*
|
|
7680
|
+
* Tags: CustomLuaState
|
|
7666
7681
|
*/
|
|
7667
7682
|
AddTag(this: CollectionService, instance: Instance, tag: string): void;
|
|
7668
7683
|
AddTag(this: Instance, tag: string): void;
|
|
@@ -7706,6 +7721,8 @@ interface CollectionService extends Instance {
|
|
|
7706
7721
|
* print("The object " .. object:GetFullName() .. " has tags: " .. table.concat(tags, ", "))
|
|
7707
7722
|
*
|
|
7708
7723
|
* This method is useful when you want to do something with multiple tags at once on an object. However, it would be inefficient to use this method to check for the existence of a single tag. For this, use [CollectionService:HasTag](https://developer.roblox.com/en-us/api-reference/function/CollectionService/HasTag) to check for a single tag.
|
|
7724
|
+
*
|
|
7725
|
+
* Tags: CustomLuaState
|
|
7709
7726
|
*/
|
|
7710
7727
|
GetTags(this: CollectionService, instance: Instance): Array<string>;
|
|
7711
7728
|
GetTags(this: Instance): Array<string>;
|
|
@@ -7716,6 +7733,8 @@ interface CollectionService extends Instance {
|
|
|
7716
7733
|
* * Using [CollectionService:RemoveTag](https://developer.roblox.com/en-us/api-reference/function/CollectionService/RemoveTag) to remove the tag will cause this method to return false.
|
|
7717
7734
|
*
|
|
7718
7735
|
* By extension, any tags returned by a call to `CollectionServiec/GetTags` on an object will return true when used with this method.
|
|
7736
|
+
*
|
|
7737
|
+
* Tags: CustomLuaState
|
|
7719
7738
|
*/
|
|
7720
7739
|
HasTag(this: CollectionService, instance: Instance, tag: string): boolean;
|
|
7721
7740
|
HasTag(this: Instance, tag: string): boolean;
|
|
@@ -7723,6 +7742,8 @@ interface CollectionService extends Instance {
|
|
|
7723
7742
|
* RemoveTag will remove some tag from some object. This method will not throw an error if the object did not have the tag in the first place. Successfully removing a tag will fire a signal created by [CollectionService:GetInstanceRemovedSignal](https://developer.roblox.com/en-us/api-reference/function/CollectionService/GetInstanceRemovedSignal) with the given tag.
|
|
7724
7743
|
*
|
|
7725
7744
|
* When removing a tag, it is common that some resources are used to give the tag its functionality, e.g. event connections or tables. To prevent memory leaks, it is a good idea to clean these up (disconnect, set to nil, etc) when no longer needed for a tag.
|
|
7745
|
+
*
|
|
7746
|
+
* Tags: CustomLuaState
|
|
7726
7747
|
*/
|
|
7727
7748
|
RemoveTag(this: CollectionService, instance: Instance, tag: string): void;
|
|
7728
7749
|
RemoveTag(this: Instance, tag: string): void;
|
|
@@ -10951,17 +10972,6 @@ interface RobloxEditableImage extends EditableImage {
|
|
|
10951
10972
|
readonly _nominal_RobloxEditableImage: unique symbol;
|
|
10952
10973
|
}
|
|
10953
10974
|
|
|
10954
|
-
interface EngineAPICloudProcessingService extends Instance {
|
|
10955
|
-
/**
|
|
10956
|
-
* **DO NOT USE!**
|
|
10957
|
-
*
|
|
10958
|
-
* This field exists to force TypeScript to recognize this as a nominal type
|
|
10959
|
-
* @hidden
|
|
10960
|
-
* @deprecated
|
|
10961
|
-
*/
|
|
10962
|
-
readonly _nominal_EngineAPICloudProcessingService: unique symbol;
|
|
10963
|
-
}
|
|
10964
|
-
|
|
10965
10975
|
/** A EulerRotation Curve represents a 3D rotation curve, it groups 3 [FloatCurves](https://developer.roblox.com/en-us/api-reference/class/FloatCurve), stored as 3 FloatCurve child instances. The rotation is decomposed in 3 Euler angles channels that can be accessed via [EulerRotationCurve:X](https://developer.roblox.com/en-us/api-reference/function/EulerRotationCurve/X), [EulerRotationCurve:Y](https://developer.roblox.com/en-us/api-reference/function/EulerRotationCurve/Y), [EulerRotationCurve:Z](https://developer.roblox.com/en-us/api-reference/function/EulerRotationCurve/Z) methods. The 3 axes can be sampled simultaneously via the method [EulerRotationCurve:GetAnglesAtTime](https://developer.roblox.com/en-us/api-reference/function/EulerRotationCurve/GetAnglesAtTime) returning the 3 Euler angles as a Vector3. Similarly, [EulerRotationCurve:GetRotationAtTime](https://developer.roblox.com/en-us/api-reference/function/EulerRotationCurve/GetRotationAtTime) samples all channels simultaneously but returns a CFrame rotated by X, Y, and Z according to the specified rotation order. */
|
|
10966
10976
|
interface EulerRotationCurve extends Instance {
|
|
10967
10977
|
/**
|
|
@@ -3498,7 +3498,6 @@ interface Studio extends Instance {
|
|
|
3498
3498
|
["Auto Indent Rule"]: Enum.AutoIndentRule;
|
|
3499
3499
|
["Auto-Recovery Enabled"]: boolean;
|
|
3500
3500
|
["Auto-Recovery Interval (Minutes)"]: number;
|
|
3501
|
-
["Auto-Recovery Path"]: QDir;
|
|
3502
3501
|
/**
|
|
3503
3502
|
* Tags: NotReplicated
|
|
3504
3503
|
*/
|
|
@@ -464,9 +464,17 @@ declare namespace Enum {
|
|
|
464
464
|
|
|
465
465
|
export const CloseButtonClicked: CloseButtonClicked;
|
|
466
466
|
|
|
467
|
+
export interface WhyThisAdClicked extends globalThis.EnumItem {
|
|
468
|
+
Name: "WhyThisAdClicked";
|
|
469
|
+
Value: 6;
|
|
470
|
+
EnumType: typeof globalThis.Enum.AdUIEventType;
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
export const WhyThisAdClicked: WhyThisAdClicked;
|
|
474
|
+
|
|
467
475
|
export function GetEnumItems(this: globalThis.Enum): Array<globalThis.Enum.AdUIEventType>;
|
|
468
476
|
}
|
|
469
|
-
export type AdUIEventType = AdUIEventType.AdLabelClicked | AdUIEventType.VolumeButtonClicked | AdUIEventType.FullscreenButtonClicked | AdUIEventType.PlayButtonClicked | AdUIEventType.PauseButtonClicked | AdUIEventType.CloseButtonClicked;
|
|
477
|
+
export type AdUIEventType = AdUIEventType.AdLabelClicked | AdUIEventType.VolumeButtonClicked | AdUIEventType.FullscreenButtonClicked | AdUIEventType.PlayButtonClicked | AdUIEventType.PauseButtonClicked | AdUIEventType.CloseButtonClicked | AdUIEventType.WhyThisAdClicked;
|
|
470
478
|
|
|
471
479
|
export namespace AdUIType {
|
|
472
480
|
export interface None extends globalThis.EnumItem {
|
|
@@ -1071,6 +1079,43 @@ declare namespace Enum {
|
|
|
1071
1079
|
}
|
|
1072
1080
|
export type AnimatorRetargetingMode = AnimatorRetargetingMode.Default | AnimatorRetargetingMode.Disabled | AnimatorRetargetingMode.Enabled;
|
|
1073
1081
|
|
|
1082
|
+
export namespace AppLifecycleManagerState {
|
|
1083
|
+
export interface Detached extends globalThis.EnumItem {
|
|
1084
|
+
Name: "Detached";
|
|
1085
|
+
Value: 0;
|
|
1086
|
+
EnumType: typeof globalThis.Enum.AppLifecycleManagerState;
|
|
1087
|
+
}
|
|
1088
|
+
|
|
1089
|
+
export const Detached: Detached;
|
|
1090
|
+
|
|
1091
|
+
export interface Active extends globalThis.EnumItem {
|
|
1092
|
+
Name: "Active";
|
|
1093
|
+
Value: 1;
|
|
1094
|
+
EnumType: typeof globalThis.Enum.AppLifecycleManagerState;
|
|
1095
|
+
}
|
|
1096
|
+
|
|
1097
|
+
export const Active: Active;
|
|
1098
|
+
|
|
1099
|
+
export interface Inactive extends globalThis.EnumItem {
|
|
1100
|
+
Name: "Inactive";
|
|
1101
|
+
Value: 2;
|
|
1102
|
+
EnumType: typeof globalThis.Enum.AppLifecycleManagerState;
|
|
1103
|
+
}
|
|
1104
|
+
|
|
1105
|
+
export const Inactive: Inactive;
|
|
1106
|
+
|
|
1107
|
+
export interface Hidden extends globalThis.EnumItem {
|
|
1108
|
+
Name: "Hidden";
|
|
1109
|
+
Value: 3;
|
|
1110
|
+
EnumType: typeof globalThis.Enum.AppLifecycleManagerState;
|
|
1111
|
+
}
|
|
1112
|
+
|
|
1113
|
+
export const Hidden: Hidden;
|
|
1114
|
+
|
|
1115
|
+
export function GetEnumItems(this: globalThis.Enum): Array<globalThis.Enum.AppLifecycleManagerState>;
|
|
1116
|
+
}
|
|
1117
|
+
export type AppLifecycleManagerState = AppLifecycleManagerState.Detached | AppLifecycleManagerState.Active | AppLifecycleManagerState.Inactive | AppLifecycleManagerState.Hidden;
|
|
1118
|
+
|
|
1074
1119
|
export namespace AppShellActionType {
|
|
1075
1120
|
export interface None extends globalThis.EnumItem {
|
|
1076
1121
|
Name: "None";
|
package/include/lua.d.ts
CHANGED
|
@@ -101,7 +101,7 @@ interface LuaMetatable<T> {
|
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
/** Sets the metatable for the given table. If `metatable` is nil, the metatable of the given table is removed. If the original metatable has a "__metatable" field, this will raise an error. This function returns the table t, which was passed to the function. */
|
|
104
|
-
declare function setmetatable<T extends object>(object: T, metatable: LuaMetatable<T>): T;
|
|
104
|
+
declare function setmetatable<T extends object>(object: T, metatable: LuaMetatable<T> | undefined): T;
|
|
105
105
|
|
|
106
106
|
/** An object the represents a date or time. Used with `os.date` and `os.time`. */
|
|
107
107
|
interface DateTable {
|
|
@@ -602,6 +602,9 @@ declare namespace bit32 {
|
|
|
602
602
|
/** Returns the number of consecutive zero bits in the 32-bit representation of the provided number starting from the right-most (least significant) bit. */
|
|
603
603
|
function countrz(n: number): number;
|
|
604
604
|
|
|
605
|
+
/** Returns `n` with the order of the bytes swapped. */
|
|
606
|
+
function byteswap(n: number): number;
|
|
607
|
+
|
|
605
608
|
/**
|
|
606
609
|
* Returns the unsigned number formed by the bits `field` to `field + width - 1` from `n`.
|
|
607
610
|
* Bits are numbered from 0 (least significant) to 31 (most significant).
|