Giter Site home page Giter Site logo

teal-types's People

Contributors

aire-one avatar euclidianace avatar fcr-- avatar fperrad avatar frityet avatar hishamhm avatar icy-lava avatar lenscas avatar mrjones2014 avatar pdesaulniers avatar profan avatar saecki avatar svermeulen avatar wqferr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

teal-types's Issues

How am I supposed to use this library?

My folder structure looks like this:

.
├── dist
│   └── ...
├── lua_modules
│   ├── lib
│   └── share
├── src
│   ├── init.tl
│   ├── inspect.d.tl
├── tlconfig.lua

lua_modules has been populated by luarocks install <package> --tree lua_modules with, eg, inspect.
In this case, should I just copy the contents of inspect.d.tl from this repo into src/inspect.d.tl?

Add type declarations for Penlight

Penlight is a "batteries"-type module for Lua, and I feel like teal would greatly benefit from integrating properly with it.

I will start my fork along with this issue, I just wanted to create this for documentation's sake.

Error: could not predefine module 'types'

I'm trying to generate types for neovim, I cloned the repo, copied the files from types/neovim/* to the root directory and ran ./autogen, tho I'm getting the error

Error: could not predefine module 'types'

It's caused by the first command: tl check autogen_tl -q

Setup CI

Considering that some changes such as teal-language/tl#159 may break a few things in the declaration files, it would be a good idea to setup CI for this repo.

how to avoid directory structure copy pasta

I am running into an issue where the folder structure of a shared typing library must also match the folder structure of the luarock paths. Ideally the types could be inferred from the luarock e.g. @types/kong, but not sure how to have tl know how to reconcile the defintion files.

├── kong
│   ├── db
│   │   ├── schema
│   │   │   └── typedefs.d.tl <----- would be nice to avoid creating the file structure since plugins (as you know @hishamhm :P) are placed within the larger context of kong with its own rockspec tree
│   │   └── schema.d.tl
│   └── plugins
│       └── myplugin
│           ├── handler.tl
│           └── schema.tl
├── kong-plugin-myplugin-0.1.0-1.rockspec
├── tlconfig.lua
└── types <----------- in the future would be nice to pull from teal-types luarocks similar to @types/<package> in typescript
    ├── kong
    │   ├── db
    │   │   ├── schema
    │   │   │   └── typedefs.d.tl
    │   │   └── schema.d.tl
    │   └── plugins
    │       └── session.d.tl
    ├── kong.d.tl
    ├── kong.lua
    ├── resty
    │   └── session.d.tl
    └── resty.tl
local typedefs = require "kong.db.schema.typedefs"

local schema = {
  name = plugin_name,
  fields = {
    { consumer = typedefs.no_consumer }, -- typedefs is only known because of the explicit folder structure
return {
  gen_target = "5.1",
  -- Execute the equivalent of `require('modulename')` before executing the script.
  preload_modules = {
    "types.resty",
    "types.kong"
  }
}

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.