@rbxts/types 1.0.619 → 1.0.620

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.
Files changed (2) hide show
  1. package/include/roblox.d.ts +15 -21
  2. package/package.json +1 -1
@@ -603,7 +603,7 @@ interface Axes {
603
603
  type AxesConstructor = new (...axes: Array<Enum.Axis | Enum.NormalId>) => Axes;
604
604
  declare const Axes: AxesConstructor;
605
605
 
606
- interface BrickColor<Number extends number = any, Name extends string = any> {
606
+ interface BrickColor<T extends keyof BrickColorsByNumber = keyof BrickColorsByNumber> {
607
607
  /**
608
608
  * **DO NOT USE!**
609
609
  *
@@ -613,9 +613,9 @@ interface BrickColor<Number extends number = any, Name extends string = any> {
613
613
  */
614
614
  readonly _nominal_BrickColor: unique symbol;
615
615
  /** The unique number that identifies the BrickColor */
616
- readonly Number: number extends Number ? keyof BrickColorsByNumber : Number;
616
+ readonly Number: T;
617
617
  /** The name associated with the BrickColor */
618
- readonly Name: string extends Name ? BrickColorsByNumber[keyof BrickColorsByNumber] : Name;
618
+ readonly Name: BrickColorsByNumber[T];
619
619
  /** The Color3 associated with the BrickColor */
620
620
  readonly Color: Color3;
621
621
  /** The red component (between 0 and 1) */
@@ -973,30 +973,29 @@ interface BrickColorConstructor {
973
973
  random: () => BrickColor;
974
974
 
975
975
  /** Returns a White BrickColor */
976
- White: () => BrickColor<1, "White">;
976
+ White: () => BrickColor<1>;
977
977
  /** Returns a Gray BrickColor */
978
- Gray: () => BrickColor<194, "Medium stone grey">;
978
+ Gray: () => BrickColor<194>;
979
979
  /** Returns a DarkGray BrickColor */
980
- DarkGray: () => BrickColor<199, "Dark stone grey">;
980
+ DarkGray: () => BrickColor<199>;
981
981
  /** Returns a Black BrickColor */
982
- Black: () => BrickColor<26, "Black">;
982
+ Black: () => BrickColor<26>;
983
983
  /** Returns a Red BrickColor */
984
- Red: () => BrickColor<21, "Bright red">;
984
+ Red: () => BrickColor<21>;
985
985
  /** Returns a Yellow BrickColor */
986
- Yellow: () => BrickColor<24, "Bright yellow">;
986
+ Yellow: () => BrickColor<24>;
987
987
  /** Returns a Green BrickColor */
988
- Green: () => BrickColor<28, "Dark green">;
988
+ Green: () => BrickColor<28>;
989
989
  /** Returns a Blue BrickColor */
990
- Blue: () => BrickColor<23, "Bright blue">;
990
+ Blue: () => BrickColor<23>;
991
991
 
992
992
  /** Constructs a BrickColor from its name. */
993
993
  new <T extends BrickColorsByNumber[keyof BrickColorsByNumber]>(val: T): BrickColor<
994
- { [K in keyof BrickColorsByNumber]: T extends BrickColorsByNumber[K] ? K : never }[keyof BrickColorsByNumber],
995
- T
994
+ { [K in keyof BrickColorsByNumber]: T extends BrickColorsByNumber[K] ? K : never }[keyof BrickColorsByNumber]
996
995
  >;
997
996
 
998
997
  /** Constructs a BrickColor from its numerical index. */
999
- new <T extends keyof BrickColorsByNumber>(val: T): BrickColor<T, BrickColorsByNumber[T]>;
998
+ new <T extends keyof BrickColorsByNumber>(val: T): BrickColor<T>;
1000
999
 
1001
1000
  /** Constructs a BrickColor from its numerical index. */
1002
1001
  new (val: number): BrickColor;
@@ -1008,13 +1007,8 @@ interface BrickColorConstructor {
1008
1007
  new (color: Color3): BrickColor;
1009
1008
 
1010
1009
  /** Constructs a BrickColor from its palette index. */
1011
- palette: {
1012
- <T extends keyof BrickColorsByPalette>(paletteValue: T): BrickColor<
1013
- BrickColorsByPalette[T],
1014
- BrickColorsByNumber[BrickColorsByPalette[T]]
1015
- >;
1016
- (paletteValue: number): BrickColor;
1017
- };
1010
+ palette<T extends keyof BrickColorsByPalette>(this: void, paletteValue: T): BrickColor<BrickColorsByPalette[T]>;
1011
+ palette(this: void, paletteValue: number): BrickColor;
1018
1012
  }
1019
1013
 
1020
1014
  declare const BrickColor: BrickColorConstructor;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rbxts/types",
3
- "version": "1.0.619",
3
+ "version": "1.0.620",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },