Socket
Socket
Sign inDemoInstall

lua-types

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lua-types

TypeScript definitions for Lua standard library


Version published
Weekly downloads
632
increased by27.42%
Maintainers
1
Weekly downloads
 
Created
Source

Lua Types

npm Travis

TypeScript definitions for Lua standard library

Installation

NOTE: In most of cases your environment-specific types would already include this package. In that case you don't need to do anything. If you're a developer of such types you should add lua-types as a dependency and load it by adding /// <reference types="lua-types/VERSION" />

  1. Get Lua Types from npm
yarn add -D lua-types
# or
npm install -D lua-types
  1. Modify your tsconfig.json
{
  "compilerOptions": {
    "types": ["lua-types/VERSION"]
  }
}

Currently supported values of VERSION are:

  • 5.1
  • 5.2
  • 5.3
  • 5.4
  • jit

Loading only a subset of features

Some Lua environments are sandboxed and don't have some globals declared, like io, os and debug. To avoid registering these globals, you can import core files separately. For example:

{
  "compilerOptions": {
    "types": [
      "lua-types/core/coroutine",
      "lua-types/core/global",
      "lua-types/core/math",
      "lua-types/core/metatable",
      "lua-types/core/modules",
      "lua-types/core/string",
      "lua-types/core/table",
      "lua-types/special/jit"
    ]
  }
}

Keywords

FAQs

Package last updated on 16 Jun 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc