runic
Rroblox-ts
•Created by runic on 4/23/2023 in #help
transformer not recognized
i updated some dependencies and of course roblox ts has to pass away
package.json
:
{
...
"devDependencies": {
"@rbxts/compiler-types": "^2.1.0-types.1",
"@rbxts/types": "^1.0.647",
"@typescript-eslint/eslint-plugin": "^4.28.4",
"@typescript-eslint/parser": "^4.28.4",
"eslint": "^7.31.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^3.4.0",
"eslint-plugin-roblox-ts": "^0.0.30",
"prettier": "^2.3.2",
"rbxts-transform-debug": "^2.0.3",
"rbxts-transform-env": "^2.0.4",
"rbxts-transformer-flamework": "^1.0.0-beta.21",
"rbxts-transformer-switchcase": "^1.0.1",
"roblox-ts": "^2.1.0",
"typescript": "^4.9.4"
},
"dependencies": {
"@flamework/components": "^1.0.0-beta.21",
"@flamework/core": "^1.0.0-beta.21",
"@flamework/networking": "^1.0.0-beta.21",
"@rbxts/fastcast": "^13.2.0-ts.2",
"@rbxts/janitor": "^1.14.1-ts.1",
"@rbxts/partcache": "^1.1.1",
"@rbxts/profileservice": "^1.4.1",
"@rbxts/roact": "^1.4.4-ts.0",
"@rbxts/roact-hooked": "^2.3.3",
"@rbxts/roact-hooked-plus": "^1.8.1",
"@rbxts/roact-rodux": "^0.2.2-ts.8",
"@rbxts/rodux": "^3.0.0-ts.3",
"@rbxts/services": "^1.5.1",
"@rbxts/signal": "^1.1.1",
"minimatch": "^3.0.5"
}
}
{
...
"devDependencies": {
"@rbxts/compiler-types": "^2.1.0-types.1",
"@rbxts/types": "^1.0.647",
"@typescript-eslint/eslint-plugin": "^4.28.4",
"@typescript-eslint/parser": "^4.28.4",
"eslint": "^7.31.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^3.4.0",
"eslint-plugin-roblox-ts": "^0.0.30",
"prettier": "^2.3.2",
"rbxts-transform-debug": "^2.0.3",
"rbxts-transform-env": "^2.0.4",
"rbxts-transformer-flamework": "^1.0.0-beta.21",
"rbxts-transformer-switchcase": "^1.0.1",
"roblox-ts": "^2.1.0",
"typescript": "^4.9.4"
},
"dependencies": {
"@flamework/components": "^1.0.0-beta.21",
"@flamework/core": "^1.0.0-beta.21",
"@flamework/networking": "^1.0.0-beta.21",
"@rbxts/fastcast": "^13.2.0-ts.2",
"@rbxts/janitor": "^1.14.1-ts.1",
"@rbxts/partcache": "^1.1.1",
"@rbxts/profileservice": "^1.4.1",
"@rbxts/roact": "^1.4.4-ts.0",
"@rbxts/roact-hooked": "^2.3.3",
"@rbxts/roact-hooked-plus": "^1.8.1",
"@rbxts/roact-rodux": "^0.2.2-ts.8",
"@rbxts/rodux": "^3.0.0-ts.3",
"@rbxts/services": "^1.5.1",
"@rbxts/signal": "^1.1.1",
"minimatch": "^3.0.5"
}
}
tsconfig.json
:
{
"compilerOptions": {
...
"plugins": [
{
"transform": "rbxts-transformer-flamework",
"obfuscation": true
},
{
"transform": "rbxts-transform-env"
},
{
"transform": "rbxts-transform-debug"
}
]
}
}
{
"compilerOptions": {
...
"plugins": [
{
"transform": "rbxts-transformer-flamework",
"obfuscation": true
},
{
"transform": "rbxts-transform-env"
},
{
"transform": "rbxts-transform-debug"
}
]
}
}
15 replies
Rroblox-ts
•Created by runic on 4/23/2023 in #help
flamework network compilation error
PS E:\@home\runic\Dev\typescript\roblox\Blackout> rbxtsc
src/shared/network.ts:33:9 - error TS2322: Type 'check<string>' is not assignable to type 'check<unknown>[]'.
33 t["string"],
~~~~~~~~~~~
src/shared/network.ts:37:9 - error TS2322: Type 'check<Vector3>' is not assignable to type 'check<unknown>[]'.
37 t["Vector3"],
~~~~~~~~~~~~
src/shared/network.ts:99:9 - error TS2322: Type '[]' is not assignable to type '[check<unknown>[], check<unknown> | undefined]'.
Source has 0 element(s) but target requires 2.
99 [],
~~
PS E:\@home\runic\Dev\typescript\roblox\Blackout> rbxtsc
src/shared/network.ts:33:9 - error TS2322: Type 'check<string>' is not assignable to type 'check<unknown>[]'.
33 t["string"],
~~~~~~~~~~~
src/shared/network.ts:37:9 - error TS2322: Type 'check<Vector3>' is not assignable to type 'check<unknown>[]'.
37 t["Vector3"],
~~~~~~~~~~~~
src/shared/network.ts:99:9 - error TS2322: Type '[]' is not assignable to type '[check<unknown>[], check<unknown> | undefined]'.
Source has 0 element(s) but target requires 2.
99 [],
~~
src/shared/network.ts
:
import { Networking } from "@flamework/networking";
import { WeaponData } from "./types";
import { PlayerData } from "./meta/default-player-data";
import { ServerResponse } from "./interfaces/network-types";
export interface ServerEvents {
discordLog(message: string, logType: string): void;
createBullet(origin: Vector3, dir: Vector3, weaponData: WeaponData): void;
}
export interface ClientEvents {
ammoChanged(ammo: { mag: number; reserve: number; }): void;
/** Fired by the server when the player's data changes */
playerDataChanged(newPlayerData: Partial<PlayerData>): void;
}
export interface ServerFunctions {
requestPlayerData(): ServerResponse<PlayerData>;
}
export interface ClientFunctions { }
export const GlobalEvents = Networking.createEvent<ServerEvents, ClientEvents>();
export const GlobalFunctions = Networking.createFunction<ServerFunctions, ClientFunctions>();
import { Networking } from "@flamework/networking";
import { WeaponData } from "./types";
import { PlayerData } from "./meta/default-player-data";
import { ServerResponse } from "./interfaces/network-types";
export interface ServerEvents {
discordLog(message: string, logType: string): void;
createBullet(origin: Vector3, dir: Vector3, weaponData: WeaponData): void;
}
export interface ClientEvents {
ammoChanged(ammo: { mag: number; reserve: number; }): void;
/** Fired by the server when the player's data changes */
playerDataChanged(newPlayerData: Partial<PlayerData>): void;
}
export interface ServerFunctions {
requestPlayerData(): ServerResponse<PlayerData>;
}
export interface ClientFunctions { }
export const GlobalEvents = Networking.createEvent<ServerEvents, ClientEvents>();
export const GlobalFunctions = Networking.createFunction<ServerFunctions, ClientFunctions>();
src/shared/network.ts
only has 26 lines.8 replies