Looks incredible! I pay for Quokk abut will definitely be giving this a try. OK so I tried it now and it is incredible! The 'show order' feature is so useful. And top level async await?! Magic! I also write Clojure code and one thing that CLojure has is a fantastic REPL. This extension really closes the gap and makes programming in Typescript very much more enjoyable. Thank you!
Does this work with tsx, Quokka does the same thing as this extension and works with tsx(react not the cli lol) but I find quokka bloated so would love to replace it with this
@@irishbruse I would have to check. I‘m not really sure. But you can give it a try 👍. If not just message me and I will try to support it. Quokka is nice but many features are Pro which cost money. That was the main incentive why Ive created that. (Imports of code, runtime support etc)
@@praktycznewskazowki6733 there is a version available but its not that intuitive to setup. But I will see what I can do in the next days. You can download it and try it out. Its also called Typescript Worksheet there
This won't accept unary prefix operators (such as -, as in -1), which is fine. However, what's not fine is that it will also accept such expression: 3 3 + 2
Looks incredible!!! Currently I'm working on a project that already has Yup implemented. I don't need to install another validation library. Are there an openapi generators for other validation libraries, specifically Yup?
Seeing all this magic i really don't understand this moaning of libraries authors that they have a problem with TypeScript and types... clearly just skill issue 🤣
Just found an issue with the code. We need to use „false“ instead of „never“ in the „CorrectStart“ type because never extends all types. Thanks for pointing that out. Also we need to add the "(" in the AllowedStarts. Checkout my github repository for the newest code and feel free to send a pull request when you find other errors: github.com/typed-rocks/typescript/blob/main/calculator.ts The
Mindblowing stuff again :) I noticed an issue: although operators weren't set as allowed starts (although minus should be as a sign of a number) the expression '/5+3' is valid but it clewarly shouldn't be the case. My solution was this: type CorrectStart<T extends string> = T extends ... ? First<Remaining> ... ? true : never : false // was 'never' before The last word was the only change. I don't know why this works but it does
@@tngerik14 Yes, absolutely, I've updated the code on github. We need to also allow a "(" at the values of AllowedStarts: github.com/typed-rocks/typescript/blob/main/calculator.ts
You basically have a mini compiler frontend. Now you gotta make it actually compute... Or make a piece of code that generates this based on a generic language grammar. This way, if you manage to get the typescript syntax working, you can run typescript from a string, at compile time... Thinking about this a bit more, if you add some sort of interface to that ts interpreter, you could produce some actual types at compile time as output of your inline ts code. But wait, what if you run this ts compile inside of itself...
Do you have a video that talks about conditional properties, for example that if in a function I send a specific prop that another one is automatically required, and if it was not sent then the other prop is kept as optional or can even be done with more props
good to know. I wonder though, is this better than using trpc? Excluding the fact that I may be part of a team that is already using OpenAPI, I want to understand when I would use this instead of trpc
Just do `const obj ={a: 1, b: [234, 567], c:{d: {e: 890}}} as const;`, now that does not work with Date types but is 100% easier. Now the video is more about taking away things like setters from existed objects, which is useful.
@@Caldaron It‘s called TypeScript Worksheet and you can download it on Jetbrains Marketplace or VSCode Marketplace. If you need any help setting it up, let me know :)