Sign in to follow this  
yurqo

Pixi and Typescript?

Recommended Posts

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?

Share this post


Link to post
Share on other sites

> 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!

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.