UNPKG

easy-api.ts

Version:

A powerful library to create your own API with ease.

1 lines 738 B
Object.defineProperty(exports,"__esModule",{value:!0});let APIFunction_1=require("../../classes/structures/APIFunction"),Error_1=require("../../classes/structures/Error");class ClearTimeout extends APIFunction_1.APIFunction{name="$clearTimeout";description="Clears a NodeJS timeout.";parameters=[{name:"Name",description:"The name for this timeout.",type:APIFunction_1.ParamType.String,required:!0,rest:!1,defaultValue:null}];usage="$clearTimeout[name]";returns=APIFunction_1.ParamType.Unknown;aliases=[];compile=!0;async run(e,[r]){if(!e.internalVarExists("NodeJS.Timeout:"+r))throw new Error_1.EATS_Error("Invalid timeout name at: "+e.function.name);e=e.getInternalVar("NodeJS.Timeout:"+r),clearTimeout(e)}}exports.default=ClearTimeout;