rbxts-transform-dev
v0.0.2
Published
A debugging transformer for roblox-ts. Contains helper functions for debugging roblox-ts code with debug information attached.
Downloads
32
Readme
rbxts-transform-dev
A debugging transformer for roblox-ts. Contains helper functions for debugging roblox-ts code with debug information attached.
How to use
import types
/// <reference types="rbxts-transform-dev" />
relpace print or warn with $debug or $print or $warn
$debug(instance)
$print(instance)
$warn(instance)
throw 'error message'
lua output
print('[test.ts:1:1] instance =', instance);
print('[test.ts:1:1]', instance);
warn('[test.ts:1:1]', instance);
error('[test.ts:1:1] error message');
Macros
$debug
test.ts
$debug(instance);
output
print(`[test.ts:1:1] instance =`, instance);
test.ts
$print(1, 2, 3);
output
print('[test.ts:1:1]', 1, 2, 3);
$warn
test.ts
$warn(1, 2, 3);
output
warn('[test.ts:1:1]', 1, 2, 3);
throw
test.ts
throw "error";
const msg = "test error";
throw msg;
output
error('[test.ts:1:1] error');
local msg = 'test error';
error('[test.ts:3:1] ' .. msg);