yurqo Posted December 26, 2019 Share Posted December 26, 2019 I'm using pixi for playable ads and currently considering to use typescript. I've barely heard about it in context of pixi before v5, but the main reason i'm thinking about it right now is that most of boilerplates on official wiki use typescript. Internet search didn't really help me to make a decision because peoples' opinion about typescript vary a lot. So is it really that useful or wide usage of ts in boilerplates is just a coincidence? Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted December 27, 2019 Share Posted December 27, 2019 > playable ads My condolences. > is it really that useful or wide usage of ts in boilerplates is just a coincidence Yes, its wide used because it reduces the pains you encounter with JS, most of stupid errors are resolved at compile-time and at the same time, and at the same it shouldn't be a problem to just compile particular file to ES6 and add it to your js-only project. Welcome to the forums! Quote Link to comment Share on other sites More sharing options...
8Observer8 Posted December 27, 2019 Share Posted December 27, 2019 TS and ES6 are very different languages. TS has enum, generics, interface (like C# and Java) and so on. TS was not develop for solving stupid errors. It is not equivalent of ES6. If you want to use TS you must to write ts-only project. Use TS for your server in Node.js and Express. It is very power language, and it is better than ES6. You can use my boilerplate: https://github.com/8Observer8/getting-started-with-pixijs-and-typescript Read my step-by-step instruction on GitHub. Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted December 27, 2019 Share Posted December 27, 2019 https://github.com/eXponenta/pixi5-playables-boilerplate has b83 encoding and loader hacks https://github.com/eXponenta/pixi5-playables-boilerplate/tree/master/src/loader , that's essential if you need to push playable in production in single html file. Quote Link to comment Share on other sites More sharing options...
Paulius Posted January 26, 2020 Share Posted January 26, 2020 On 12/27/2019 at 7:12 PM, 8Observer8 said: TS and ES6 are very different languages. TS has enum, generics, interface (like C# and Java) and so on. TS was not develop for solving stupid errors. It is not equivalent of ES6. If you want to use TS you must to write ts-only project. Use TS for your server in Node.js and Express. It is very power language, and it is better than ES6. You can use my boilerplate: https://github.com/8Observer8/getting-started-with-pixijs-and-typescript Read my step-by-step instruction on GitHub. That's wrong. Typescript compiles to Javascript. Enums, generics, interfaces are all compile-time and they disappear after you compile. After that you can use it in any Javascript project anywhere, as long as it's up to whatever ES standard your compile target was. So yes, you can use TS and JS at the same time. It doesn't really matter. Quote Link to comment Share on other sites More sharing options...
Paulius Posted January 26, 2020 Share Posted January 26, 2020 On 12/27/2019 at 7:12 PM, 8Observer8 said: TS and ES6 are very different languages. TS has enum, generics, interface (like C# and Java) and so on. TS was not develop for solving stupid errors. It is not equivalent of ES6. If you want to use TS you must to write ts-only project. Use TS for your server in Node.js and Express. It is very power language, and it is better than ES6. You can use my boilerplate: https://github.com/8Observer8/getting-started-with-pixijs-and-typescript Read my step-by-step instruction on GitHub. That's wrong. Typescript compiles to Javascript. Enums, generics, interfaces are all compile-time and they disappear after you compile. After that you can use it in any Javascript project anywhere, as long as it's up to whatever ES standard your compile target was. So yes, you can use TS and JS at the same time. It doesn't really matter. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.