GithubHelp home page GithubHelp logo

types-lua's Introduction

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 types-lua as a dependency and load it by adding /// <reference types="types-lua/VERSION" />

  1. Get Lua Types from npm
yarn add -D types-lua
# or
npm install -D types-lua
  1. Modify your tsconfig.json
{
  "compilerOptions": {
    "types": ["types-lua/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 should look at the version-specific file at the root of this package and loaded each of it's dependencies separately. For example

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

types-lua's People

Contributors

ark120202 avatar endel avatar hazzard993 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.