From 9c824bcaa6582bfca1331c91dd02ffaadd9d6c24 Mon Sep 17 00:00:00 2001 From: Linden <65407488+thelindat@users.noreply.github.com> Date: Sun, 9 Oct 2022 03:53:11 +1100 Subject: [PATCH] fix(Lua/runtime): missing function and type declarations --- Lua/runtime/env.lua | 1 + Lua/runtime/luaglm.lua | 8 ++++++++ package.json | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Lua/runtime/env.lua b/Lua/runtime/env.lua index 6bd39b4..f5f5277 100644 --- a/Lua/runtime/env.lua +++ b/Lua/runtime/env.lua @@ -26,6 +26,7 @@ function GetPlayers() end ---@class state ---@field get fun(self, key: string): any ---@field set fun(self, key: string, value: any, replicated: boolean?) +---@field [string] any ---@class statebag ---@field state state diff --git a/Lua/runtime/luaglm.lua b/Lua/runtime/luaglm.lua index b0f603d..790c2cb 100644 --- a/Lua/runtime/luaglm.lua +++ b/Lua/runtime/luaglm.lua @@ -208,3 +208,11 @@ function each(...) end function quat(...) end qua = quat + +---Returns the current time in nanoseconds. +---@return number +function os.nanotime() end + +---Returns the current time in microseconds +---@return number +function os.microtime() end diff --git a/package.json b/package.json index 25ac8ac..a10efdd 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "cfxlua-vscode", "displayName": "cfxlua-vscode", "description": "IntelliSense support for the Lua Script runtime used by FiveM and RedM", - "version": "1.1.1", + "version": "1.1.2", "publisher": "overextended", "license": "MIT", "repository": {