@rbxts/zircon
Version:
<div> <img src="https://i.imgur.com/YgpbX7G.png" align="left" width="128"/> <h1>ZIRCON</h1> <h3>A clean, sleek, runtime debugging console for Roblox</h3> <a href="https://npmjs.com/package/@rbxts/zircon"><img src="https://badge.fury.io
67 lines (66 loc) • 2.38 kB
TypeScript
/// <reference types="@rbxts/types" />
/// <reference types="@rbxts/compiler-types" />
import { LogEvent } from "@rbxts/log";
import ZrContext from "@rbxts/zirconium/out/Data/Context";
import { ZirconFunction } from "./ZirconFunction";
import { ZrInputStream, ZrOutputStream } from "@rbxts/zirconium/out/Data/Stream";
export interface ReadonlyZirconContext {
GetExecutor(): Player;
GetFunctionName(): string;
}
export interface ZirconBeforeContext extends ReadonlyZirconContext {
GetInput(): ZrInputStream;
}
export interface ZirconAfterContext extends ReadonlyZirconContext {
GetInput(): ZrInputStream;
GetOutput(): ZrOutputStream;
GetLogs(): ReadonlyArray<LogEvent>;
}
export declare class ZirconContext implements ReadonlyZirconContext, ZirconBeforeContext, ZirconAfterContext {
private innerContext;
private executingFunction;
private logs;
constructor(innerContext: ZrContext, executingFunction: ZirconFunction<any, any>);
GetExecutor(): Player;
/**
* Writes a log response to the executing player
* @param level The log level
* @param template The template string
* @param args The arguments to the template string
*/
private Log;
/**
* Logs an information message to the calling player
* @param template The template string
* @param args The template string args
*/
LogInfo(template: string, ...args: unknown[]): void;
/**
* Logs a warning message to the calling player
* @param template The template string
* @param args The template string args
*/
LogWarning(template: string, ...args: unknown[]): void;
/**
* Logs an error message to the calling player
* @param template The template string
* @param args The template string args
*/
LogError(template: string, ...args: unknown[]): void;
GetLogs(): ReadonlyArray<LogEvent>;
/**
* Gets the output stream for the `|` pipe operator
* @returns The output stream
*/
GetOutput(): ZrOutputStream;
/**
* Gets the input stream for the `|` pipe operator
* @returns The input stream
*/
GetInput(): ZrInputStream;
/**
* Gets the name of the calling function
* @returns The name of the calling function
*/
GetFunctionName(): string;
}