After that you need to decide which linter to use if any, among other tools and libraries, but that sets up a basic TS project for you. You still need to decide if you're gonna use webpack or babel or whatever, though TS can handle a lot of that for you too. Going through their configuration documentation will show a lot of cool things you can do with just the TS compiler.
Also I don't think you need to do <any>window in TS because there's no need to do window.whatever I do believe. Though without a code snippet perhaps I misunderstood you and am wrong.
I'll look at that option; this article was something I came across ... perhaps I'll run this pattern on the next project I do. The article I found that generated this one was two years old and piqued my curiosity.
Unfortunately, I didn't find this on a quick search.
I did find something interesting I wanted to try out.
As to <any>window ... there is a specific need within my project (which will be made public soon, not yet).
Thanks for the "food for thought," awesome information!
“As much as I’d love our code to be fully compliant with the great programming practices of this world, I’d rather have it working — if possible before the heat death of the Universe.”
There is a way to extend the Window interface and declare the type of your globals so that you don't lose TS's help (using any should always be avoided):in a typings.d.ts file possibly at the root of your source folder, write something like that:
Getting a vanilla TS project going should be as simple as:
After that you need to decide which linter to use if any, among other tools and libraries, but that sets up a basic TS project for you. You still need to decide if you're gonna use webpack or babel or whatever, though TS can handle a lot of that for you too. Going through their configuration documentation will show a lot of cool things you can do with just the TS compiler.
Also I don't think you need to do
<any>window
in TS because there's no need to dowindow.whatever
I do believe. Though without a code snippet perhaps I misunderstood you and am wrong.I'll look at that option; this article was something I came across ... perhaps I'll run this pattern on the next project I do. The article I found that generated this one was two years old and piqued my curiosity.
As to <any>window ... there is a specific need within my project (which will be made public soon, not yet).
Thanks for the "food for thought," awesome information!
There is a way to extend the
Window
interface and declare the type of your globals so that you don't lose TS's help (usingany
should always be avoided):in a typings.d.ts file possibly at the root of your source folder, write something like that:Elegant. I’ve gone through a few other things. I’ll try it out.