GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Error object returned by pcall() declared to always be a string · Issue #79 · TypeScriptToLua/lua-types Open DescriptionDescription
To reproduceConsider the following example (playground): function foo(this: void) { throw {} } let result = pcall(foo) if (!result[0]) { print("error: " + result[1]) } Function If the correct type is added to the declaration of let result: [true, void] | [false, unknown] = pcall(foo) Generated code: --[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]] function foo() error({}, 0) end result = {pcall(foo)} if not result[1] then print("error: " .. tostring(result[2])) end Expected behaviorI think that the return type of ActivityMetadataMetadataAssigneesLabelsNo labels TypeProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |