UNPKG

easy-api.ts

Version:

A powerful library to create your own API with ease.

29 lines (28 loc) 784 B
import { CompiledFunction } from "../../classes/internal/CompiledFunction"; import { APIFunction, ParamType } from "../../classes/structures/APIFunction"; import { Data } from "../../classes/structures/Data"; /** * Represents an if block. */ export interface IfBlock { name: string; code: string; condition: string | null; } export default class Statement extends APIFunction { name: string; description: string; parameters: { name: string; description: string; type: ParamType; required: boolean; rest: boolean; defaultValue: null; }[]; usage: string; returns: ParamType; compile: boolean; aliases: string[]; run(this: CompiledFunction, d: Data, [code]: string[]): Promise<unknown>; }