Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. TypeScript

TypeScript

Scheduled Pinned Locked Moved The Lounge
javascriptcsharpasp-netcssdotnet
17 Posts 11 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Marc Clifton

    OK, I'm sold. Sometimes it takes me a while to take on a new technology, especially when I don't want to buy into all the other stuff it gets entangled with. Such was the case with TypeScript, but I really didn't want to drink the Angular Kool-Aid, nor necessarily the ASP.NET / .NET Core Hawaiian Punch. But after figuring out how to get TypeScript to work in Visual Studio in a purely client-side development environment, and after using it now for a week to write a little homebrew application, I am definitely sold. So much less grief with stupid Javascript syntax errors, etc. Why didn't I do this sooner? ;)

    Latest Articles:
    Client-Side TypeScript without ASP.NET, Angular, etc.

    K Offline
    K Offline
    kmoorevs
    wrote on last edited by
    #7

    Definitely one of those things that I feel like I need to try, but never had the time. :sigh: Maybe this is the encouragement I need to finally give it a go. :thumbsup:

    "Go forth into the source" - Neal Morse

    1 Reply Last reply
    0
    • M Marc Clifton

      OK, I'm sold. Sometimes it takes me a while to take on a new technology, especially when I don't want to buy into all the other stuff it gets entangled with. Such was the case with TypeScript, but I really didn't want to drink the Angular Kool-Aid, nor necessarily the ASP.NET / .NET Core Hawaiian Punch. But after figuring out how to get TypeScript to work in Visual Studio in a purely client-side development environment, and after using it now for a week to write a little homebrew application, I am definitely sold. So much less grief with stupid Javascript syntax errors, etc. Why didn't I do this sooner? ;)

      Latest Articles:
      Client-Side TypeScript without ASP.NET, Angular, etc.

      R Offline
      R Offline
      RickZeeland
      wrote on last edited by
      #8

      It is also one of the favourites on Slant, see overview here: best-languages-that-compile-to-javascript[^] :-\

      1 Reply Last reply
      0
      • Richard DeemingR Richard Deeming

        If only we knew someone who'd written a book about it[^], eh @Pete-OHanlon? :)


        "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

        S Offline
        S Offline
        Slacker007
        wrote on last edited by
        #9

        I bought that book a few weeks ago. :thumbsup: https://www.amazon.com/Peter-OHanlon/e/B07VFXCBXJ%3Fref=dbs_a_mng_rwt_scns_share[^]

        1 Reply Last reply
        0
        • M Marc Clifton

          OK, I'm sold. Sometimes it takes me a while to take on a new technology, especially when I don't want to buy into all the other stuff it gets entangled with. Such was the case with TypeScript, but I really didn't want to drink the Angular Kool-Aid, nor necessarily the ASP.NET / .NET Core Hawaiian Punch. But after figuring out how to get TypeScript to work in Visual Studio in a purely client-side development environment, and after using it now for a week to write a little homebrew application, I am definitely sold. So much less grief with stupid Javascript syntax errors, etc. Why didn't I do this sooner? ;)

          Latest Articles:
          Client-Side TypeScript without ASP.NET, Angular, etc.

          Z Offline
          Z Offline
          ZurdoDev
          wrote on last edited by
          #10

          I've never needed to use it so I haven't. What does it give you?

          Social Media - A platform that makes it easier for the crazies to find each other. Everyone is born right handed. Only the strongest overcome it. Fight for left-handed rights and hand equality.

          M 1 Reply Last reply
          0
          • P Pete OHanlon

            TypeScript is fantastic. I love it and I wish that C# had features like rest and spread (yes, these are JavaScript features, but as it's TypeScript we're talking about, I'm claiming that one for the home team).

            Advanced TypeScript Programming Projects

            M Offline
            M Offline
            Marc Clifton
            wrote on last edited by
            #11

            Breaking the lounge rules here, a question about spread. Given something like: Math.max(...aLargeArray) and that I read that it does inplace replacement of the parameter list, did you ever look at what happens when the array has 10's of thousands of entries? I was about to use the spread operator on something and realized this might be a very bad idea, so opted for Math.max.apply(Math, aLargeArray)

            Latest Articles:
            Client-Side TypeScript without ASP.NET, Angular, etc.

            P 1 Reply Last reply
            0
            • Z ZurdoDev

              I've never needed to use it so I haven't. What does it give you?

              Social Media - A platform that makes it easier for the crazies to find each other. Everyone is born right handed. Only the strongest overcome it. Fight for left-handed rights and hand equality.

              M Offline
              M Offline
              Marc Clifton
              wrote on last edited by
              #12

              ZurdoDev wrote:

              What does it give you?

              It's the difference between strongly typed vs. duck-typed. So you get real Intellisense and compile-time type checking, which when coupled with an IDE like Visual Studio (one option among many) you get to see the type errors before running the program. Some of the type definition syntax is more functional programming-like, so you can say "this type is of type A or B", which is neat. Given my general (and strong) distaste for duck-typed languages, TypeScript is a definite boon and significantly decreases the number of bonehead (and some not so bonehead) mistakes that I make programming in pure Javascript. My coding is also faster due to Intellisense, almost up to par with my efficiency with C#.

              Latest Articles:
              Client-Side TypeScript without ASP.NET, Angular, etc.

              Z 1 Reply Last reply
              0
              • M Marc Clifton

                ZurdoDev wrote:

                What does it give you?

                It's the difference between strongly typed vs. duck-typed. So you get real Intellisense and compile-time type checking, which when coupled with an IDE like Visual Studio (one option among many) you get to see the type errors before running the program. Some of the type definition syntax is more functional programming-like, so you can say "this type is of type A or B", which is neat. Given my general (and strong) distaste for duck-typed languages, TypeScript is a definite boon and significantly decreases the number of bonehead (and some not so bonehead) mistakes that I make programming in pure Javascript. My coding is also faster due to Intellisense, almost up to par with my efficiency with C#.

                Latest Articles:
                Client-Side TypeScript without ASP.NET, Angular, etc.

                Z Offline
                Z Offline
                ZurdoDev
                wrote on last edited by
                #13

                Marc Clifton wrote:

                It's the difference between strongly typed vs. duck-typed.

                Ya, that's what I have always heard. I guess it's just never been a problem enough for me to care. Someday maybe.

                Social Media - A platform that makes it easier for the crazies to find each other. Everyone is born right handed. Only the strongest overcome it. Fight for left-handed rights and hand equality.

                1 Reply Last reply
                0
                • M Marc Clifton

                  Breaking the lounge rules here, a question about spread. Given something like: Math.max(...aLargeArray) and that I read that it does inplace replacement of the parameter list, did you ever look at what happens when the array has 10's of thousands of entries? I was about to use the spread operator on something and realized this might be a very bad idea, so opted for Math.max.apply(Math, aLargeArray)

                  Latest Articles:
                  Client-Side TypeScript without ASP.NET, Angular, etc.

                  P Offline
                  P Offline
                  Pete OHanlon
                  wrote on last edited by
                  #14

                  Yeah, that would be a bad use of it. I wouldn't use a spread operation in a scenario like this.

                  Advanced TypeScript Programming Projects

                  1 Reply Last reply
                  0
                  • M Marc Clifton

                    OK, I'm sold. Sometimes it takes me a while to take on a new technology, especially when I don't want to buy into all the other stuff it gets entangled with. Such was the case with TypeScript, but I really didn't want to drink the Angular Kool-Aid, nor necessarily the ASP.NET / .NET Core Hawaiian Punch. But after figuring out how to get TypeScript to work in Visual Studio in a purely client-side development environment, and after using it now for a week to write a little homebrew application, I am definitely sold. So much less grief with stupid Javascript syntax errors, etc. Why didn't I do this sooner? ;)

                    Latest Articles:
                    Client-Side TypeScript without ASP.NET, Angular, etc.

                    M Offline
                    M Offline
                    Member 9167057
                    wrote on last edited by
                    #15

                    Not getting new stuff when it's new isn't the worst of ideas. It's been true for HDMI/HDTV and it's very true in the web space. While we're at it, .NET 1.0 was a great concept but I'm glad I didn't get aboard back then in retrospective as well. Tech producers are too focused to produce an MVP quickly that they kinda forget the V in the process, going for quickly first. That said, I don't know how V TS was when it was first released. I am just stating general truths here.

                    1 Reply Last reply
                    0
                    • M Marc Clifton

                      OK, I'm sold. Sometimes it takes me a while to take on a new technology, especially when I don't want to buy into all the other stuff it gets entangled with. Such was the case with TypeScript, but I really didn't want to drink the Angular Kool-Aid, nor necessarily the ASP.NET / .NET Core Hawaiian Punch. But after figuring out how to get TypeScript to work in Visual Studio in a purely client-side development environment, and after using it now for a week to write a little homebrew application, I am definitely sold. So much less grief with stupid Javascript syntax errors, etc. Why didn't I do this sooner? ;)

                      Latest Articles:
                      Client-Side TypeScript without ASP.NET, Angular, etc.

                      F Offline
                      F Offline
                      Fabio Franco
                      wrote on last edited by
                      #16

                      Welcome to the club

                      Marc Clifton wrote:

                      Why didn't I do this sooner? ;)

                      I would speculate that for the same reason that I didn't: Skepticism and too much hearsay.

                      To alcohol! The cause of, and solution to, all of life's problems - Homer Simpson ---- Our heads are round so our thoughts can change direction - Francis Picabia

                      1 Reply Last reply
                      0
                      • M Marc Clifton

                        OK, I'm sold. Sometimes it takes me a while to take on a new technology, especially when I don't want to buy into all the other stuff it gets entangled with. Such was the case with TypeScript, but I really didn't want to drink the Angular Kool-Aid, nor necessarily the ASP.NET / .NET Core Hawaiian Punch. But after figuring out how to get TypeScript to work in Visual Studio in a purely client-side development environment, and after using it now for a week to write a little homebrew application, I am definitely sold. So much less grief with stupid Javascript syntax errors, etc. Why didn't I do this sooner? ;)

                        Latest Articles:
                        Client-Side TypeScript without ASP.NET, Angular, etc.

                        R Offline
                        R Offline
                        rhyous
                        wrote on last edited by
                        #17

                        If you have waited this long, you might as well wait one more year then move entirely off of JavaScript with Blazor. Of course, TypeScript will probably cut out JavaScript, as well, and switch to compile directly to WebAssembly, so you will still be off of JavaScript either way.

                        1 Reply Last reply
                        0
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        • Login

                        • Don't have an account? Register

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • World
                        • Users
                        • Groups