Coder Social home page Coder Social logo

Comments (6)

justdaft avatar justdaft commented on May 19, 2024 1

from tiled-to-godot-export.

nerochiaro avatar nerochiaro commented on May 19, 2024

Since a while we have an NPM package called tiled-api: https://www.npmjs.com/package/@mapeditor/tiled-api

Using it in an extension enables code completion and API documentation to show up in a JS editor, like VS Code. It would be nice to set this up for this extension as well.

Could you please elaborate a bit on what would you consider "setting this up" for the extension ?
Just having a package.json for the project with the types package appearing in the devDependencies ?

from tiled-to-godot-export.

bjorn avatar bjorn commented on May 19, 2024

Could you please elaborate a bit on what would you consider "setting this up" for the extension ?
Just having a package.json for the project with the types package appearing in the devDependencies ?

Yes, and for the source files to be modified to take advantage of it where necessary. In JS files, you often need type annotations in comments to tell VS Code the type of variables, function parameters and return values.

from tiled-to-godot-export.

nerochiaro avatar nerochiaro commented on May 19, 2024

Right. I have always found specifying types as JSDoc comments a bit painful, and much prefer the type annotation syntax of typescript. But I guess since we are dealing with the QT JS engine, there's no other way to do it since we don't want to have to rebuild the extension every time something changes.

from tiled-to-godot-export.

eleniums avatar eleniums commented on May 19, 2024

Closed by PR #49

from tiled-to-godot-export.

bjorn avatar bjorn commented on May 19, 2024

But I guess since we are dealing with the QT JS engine, there's no other way to do it since we don't want to have to rebuild the extension every time something changes.

Right, some extensions are written in TypeScript and just deal with the compilation step somehow, like https://github.com/sponge/keen-tiled. Anyway I'm not advocating to port this extension to TypeScript.

from tiled-to-godot-export.

Related Issues (20)

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.