New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add TypeScript type definitions #14
Comments
|
@cstoquer It has been a bit since I've worked with browserify, but it does look like tsify will fit the bill. Looks like it supports tsconfig.json or you can pass in settings at build time. As a dev I'd prefer having the tsconfig available, or at least some way to alter the more common settings in the GUI. In response to your question on itch
Yeah, I would expect if I toggle the scripting language to TS, I would get a main.ts as my entry point. As for 'where', either just including the declaration files somewhere in the project directory, or publishing them to the Luckily there are some utilities available for generating TS declaration files from JSDoc'd .js files, though I'm unsure of the quality of the output of such tools. Probably worth looking into. As for the magic during the build, not sure how it may affect anything discussed so far, happy to take a look if further advice is needed there. |
|
@TyPhyter the typescript compiler itself should be enough, I tested out using .ts files and my own tsconfig.json and the compiled output is picked up by pixelbox as long as the output is ES6. i have the .ts files compile a .js file adjacent so its picked up by the pixelbox client. i could try my hand at a PR, we just really need to transform the src/* files to .js and everything else around can just work as-is. |
Build is done with Browserify. We can add tsify to compile TypeScript to ES5.
Help and recommendation would be appreciated as my experience with TypeScript is very limited. In particular, we need to answer the following questions:
@types/pixelboxinnode_modulesbut I'm not sure if it's the best solution.The text was updated successfully, but these errors were encountered: