Skip to content

Commit

Permalink
Update to rbxts 2
Browse files Browse the repository at this point in the history
  • Loading branch information
Vorlias committed Sep 28, 2022
1 parent de6f3b6 commit 596bdb5
Show file tree
Hide file tree
Showing 7 changed files with 1,376 additions and 1,124 deletions.
2,455 changes: 1,354 additions & 1,101 deletions package-lock.json

Large diffs are not rendered by default.

34 changes: 17 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,34 +26,34 @@
},
"types": "out/index.d.ts",
"devDependencies": {
"@rbxts/compiler-types": "1.2.7-types.1",
"@rbxts/types": "^1.0.537",
"@typescript-eslint/eslint-plugin": "^4.4.1",
"@typescript-eslint/parser": "^4.4.1",
"@rbxts/compiler-types": "2.0.4-types.0",
"@rbxts/types": "^1.0.642",
"@typescript-eslint/eslint-plugin": "^5.38.1",
"@typescript-eslint/parser": "^5.38.1",
"concurrently": "^5.3.0",
"cross-env": "^7.0.3",
"eslint": "^7.11.0",
"eslint-config-prettier": "^6.13.0",
"eslint-plugin-prettier": "^3.1.4",
"eslint-plugin-roblox-ts": "0.0.24",
"prettier": "^2.1.2",
"rbxts-transform-debug": "1.0.0-ts4.4",
"rbxts-transform-env": "1.0.0-ts4.4",
"rbxts-transformer-services": "^1.0.0",
"roblox-ts": "^1.2.7",
"typescript": "=4.4.4"
"eslint": "^8.24.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-roblox-ts": "0.0.34",
"prettier": "^2.7.1",
"rbxts-transform-debug": "~2.0.2",
"rbxts-transform-env": "~2.0.2",
"rbxts-transformer-services": "^1.0.1",
"roblox-ts": "~2.0.4",
"typescript": "~4.8.4"
},
"dependencies": {
"@rbxts/flipper": "^2.0.1",
"@rbxts/log": "0.5.0-beta.1",
"@rbxts/log": "^0.6.3",
"@rbxts/maid": "^1.0.0-ts.1",
"@rbxts/message-templates": "^0.3.2",
"@rbxts/net": "^3.0.0-alpha.0",
"@rbxts/net": "^3.0.3",
"@rbxts/roact": ">=1.4.0-ts < 1.5.0-ts",
"@rbxts/roact-hooks": "=0.3.0-ts.2",
"@rbxts/roact-rodux": "=0.2.2-ts.5",
"@rbxts/rodux": "=3.0.0-ts.3",
"@rbxts/rust-classes": "=0.11.0-beta.1",
"@rbxts/rust-classes": "=0.11.2",
"@rbxts/services": "^1.2.0",
"@rbxts/signal": "^1.0.3",
"@rbxts/snapdragon": "2.0.0-beta.1",
Expand Down
2 changes: 1 addition & 1 deletion src/Client/Components/ScrollView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ interface ScrollViewEvents {
CanvasPositionChanged?: (position: Vector2, view: ScrollView<never>) => void;
}

export type InferEnumNames<T> = T extends { EnumType: Enum.EnumType<infer A> } ? A["Name"] : never;
export type InferEnumNames<T> = T extends { EnumType: Enum, Name: infer A } ? A : never;
interface ScrollViewProps extends ScrollViewEvents {
Size?: UDim2;
Position?: UDim2;
Expand Down
5 changes: 2 additions & 3 deletions src/Client/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ import { ContextActionService, Players, RunService, StarterGui, UserInputService
import ZirconClientStore from "./BuiltInConsole/Store";
import { ConsoleActionName } from "./BuiltInConsole/Store/_reducers/ConsoleReducer";
import ZirconDockedConsole, { DockedConsoleProps } from "./BuiltInConsole/UI/DockedConsole";
import { $ifEnv } from "rbxts-transform-env";
import { $dbg, $print } from "rbxts-transform-debug";
import { $dbg, $package } from "rbxts-transform-debug";
import Lazy from "../Shared/Lazy";
import { GetCommandService } from "../Services";
import Remotes, {
Expand Down Expand Up @@ -251,7 +250,7 @@ namespace ZirconClient {
context: ZirconContext.Client,
message: {
type: ZirconNetworkMessageType.ZirconStandardOutputMessage,
message: `Loaded Zircon v${PKG_VERSION}`,
message: `Loaded Zircon v${$package.version}`,
level: ZirconLogLevel.Debug,
time: DateTime.now().UnixTimestamp,
tag: "INIT",
Expand Down
1 change: 0 additions & 1 deletion src/Services/RegistryService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { Players } from "@rbxts/services";
import ZrScriptContext from "@rbxts/zirconium/out/Runtime/ScriptContext";
import { toArray } from "../Shared/Collections";
import ZirconUserGroup, { ZirconPermissions } from "../Server/Class/ZirconGroup";
import { $ifEnv } from "rbxts-transform-env";
import ZrPlayerScriptContext from "@rbxts/zirconium/out/Runtime/PlayerScriptContext";
import { ZirconFunction } from "Class/ZirconFunction";
import { ZirconNamespace } from "Class/ZirconNamespace";
Expand Down
2 changes: 1 addition & 1 deletion src/Shared/Collections.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export function setsEqual<TValue>(
return true;
}

export function last<TValue>(collection: Array<TValue>, amount: number): Array<TValue> {
export function last<TValue extends defined>(collection: Array<TValue>, amount: number): Array<TValue> {
const amountCalculated = math.min(amount, collection.size());
const newArray = new Array<TValue>(amountCalculated);
for (let start = collection.size() - amountCalculated; start < collection.size(); start++) {
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"strict": true,
"target": "ESNext",
"typeRoots": ["node_modules/@rbxts"],
"moduleDetection": "force",

// configurable
"rootDir": "src",
Expand Down

0 comments on commit 596bdb5

Please sign in to comment.