(instance: Instance, className: T): instance is Instances[T];
/**
* Returns the passed argument. This function is a macro that compiles to just `arg`.
*
* This is useful for ensuring that a value matches the given type in areas where it is not directly possible to do so.
* @example
* type P = { x: number, y: number };
* const obj = {
* pos: identity({ x: 5, y: 10 });
* }
*/
declare function identity(arg: T): T;
/**
* **Only valid as the expression of a for-of loop!**
*
* Used to compile directly to normal Lua numeric for loops. For example,
* ```ts
* for (const i of $range(1, 10)) {
* print(i);
* }
* ```
* will compile into
* ```lua
* for i = 1, 10 do
* print(i)
* end
* ```
*
* The `step` argument controls the amount incremented per loop. It defaults to `1`.
*/
declare function $range(start: number, finish: number, step?: number): Iterable;
/**
* **Only valid as the expression of a return statement!**
*
* Compiles directly to a multiple return in Lua. For example,
* ```ts
* return $tuple(123, "abc", true);
* ```
* will compile into
* ```lua
* return 123, "abc", true
* ```
*/
declare function $tuple>(...values: T): LuaTuple;
/**
* Provides the instance tree representation to `path` at runtime.
*
* ```ts
* $getModuleTree("@rbxts/services");
* ```
* will, assuming the default rojo game project, compile into
* ```lua
* { game:GetService("ReplicatedStorage"), { "rbxts_include", "node_modules", "@rbxts", "services" } }
* ```
*/
declare function $getModuleTree(module: string): [root: Instance, parts: Array];