Skip to content

Add TypeScript types and maybe publish to NPM. Or maybe Teal instead? #3

Open

Description

@samuelh2005

Some Lua / CC projects makes use TypeScript rather then regular Lua but it gets traspiled to regular Lua using TypeScriptToLua. They do this for a better IDE experience and to use advance fetures like classes (which Lua does not nativly support without hacks).

It is possibile to import regular Lua files in such an envrionment however the IDE will complain about missing type definitions.

Whilst it is possible for the project to make their own type defitions for Basalt - it would be better if Basalt came with their own.

Furthermore, you can publish Basalt to NPM (which publishing Lua scripts is allowed) to make it easier for TSTL based projects to use.

You don't have to replace your existing Lua files with TypeScript - we just need type declaration files - actually you just need one basalt.d.ts file inside your release folder.

Activity

  1. SirEdvin commented on Sep 28, 2025

    @SirEdvin

    I would double this, having typescript mappings would be very cool

  2. SirEdvin commented on Nov 1, 2025

    @SirEdvin

    For anyone intersected, here is my version of mappings. It is not complete by any means, because it covers only things that I used, but it is usable to some extent.

  3. samuelh2005 commented on Apr 5, 2026

    @samuelh2005
    Author

    Perhaps Teal could be used instead? It is Lua with types. This means we don't have to rewrite Basalt in TypeScript.

  4. changed the title [-]Add TypeScript types and maybe publish to NPM.[/-] [+]~~Add TypeScript types and maybe publish to NPM.~~ Or maybe Teal instead?[/+] on Apr 5, 2026
  5. changed the title [-]~~Add TypeScript types and maybe publish to NPM.~~ Or maybe Teal instead?[/-] [+]~Add TypeScript types and maybe publish to NPM.~ Or maybe Teal instead?[/+] on Apr 5, 2026
  6. changed the title [-]~Add TypeScript types and maybe publish to NPM.~ Or maybe Teal instead?[/-] [+]Add TypeScript types and maybe publish to NPM. Or maybe Teal instead?[/+] on Apr 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions