Matt Pocock
Matt Pocock
  • Видео 163
  • Просмотров 6 304 794
TypeScript 5.5 is a BANGER
0:00 Intro
0:12 Regex Checking
1:08 ${configDir}
2:23 isolatedDeclarations
4:35 My book!
5:33 Type Predicate Inference
8:17 Final Stuff
Sign up to learn more about my upcoming book:
www.totaltypescript.com/newsletter
Follow Matt on Twitter
mattpocockuk
Join the Discord:
mattpocock.com/discord
Просмотров: 51 830

Видео

My "as few deps as possible" monorepo setup
Просмотров 31 тыс.Месяц назад
Become a TypeScript Wizard with my free beginners TypeScript Course: www.totaltypescript.com/tutorials/beginners-typescript Follow Matt on Twitter mattpocockuk Join the Discord: mattpocock.com/discord
Everyone's talking about gql.tada
Просмотров 43 тыс.4 месяца назад
00:00 Magical Inference 00:57 Language Server 02:16 gql.tada 03:34 TypeScript Performance Docs: github.com/0no-co/gql.tada Phil's Tweet: _philpl/status/1748084361939886437 My book: github.com/total-typescript/total-typescript-book Become a TypeScript Wizard with my free beginners TypeScript Course: www.totaltypescript.com/tutorials/beginners-typescript Follow Matt on Twitter twitter...
8 TypeScript Tips To Expand Your Mind (and improve your code)
Просмотров 77 тыс.4 месяца назад
8 TypeScript Tips To Expand Your Mind (and improve your code)
Most React devs don’t understand generic components
Просмотров 47 тыс.5 месяцев назад
Most React devs don’t understand generic components
Declaring globals isn't that hard
Просмотров 29 тыс.5 месяцев назад
Declaring globals isn't that hard
Most TS devs don't understand 'satisfies'
Просмотров 53 тыс.5 месяцев назад
Most TS devs don't understand 'satisfies'
TypeScript 5.3 is a no-brainer upgrade
Просмотров 87 тыс.7 месяцев назад
TypeScript 5.3 is a no-brainer upgrade
Rethink your life choices before you do this...
Просмотров 29 тыс.8 месяцев назад
Rethink your life choices before you do this...
The TSConfig Cheat Sheet
Просмотров 33 тыс.8 месяцев назад
The TSConfig Cheat Sheet
'.js' files in TypeScript - why?!
Просмотров 20 тыс.8 месяцев назад
'.js' files in TypeScript - why?!
Import vs Require: The Biggest JavaScript Divide
Просмотров 50 тыс.9 месяцев назад
Import vs Require: The Biggest JavaScript Divide
TypeScript 5.3 First Look
Просмотров 41 тыс.10 месяцев назад
TypeScript 5.3 First Look
Dynamic objects should NOT be this hard
Просмотров 37 тыс.10 месяцев назад
Dynamic objects should NOT be this hard
as const: the most underrated TypeScript feature
Просмотров 112 тыс.10 месяцев назад
as const: the most underrated TypeScript feature
Everyone's talking about Valibot
Просмотров 46 тыс.10 месяцев назад
Everyone's talking about Valibot
Fix your useRefs with ElementRef
Просмотров 18 тыс.11 месяцев назад
Fix your useRefs with ElementRef
The empty object is TypeScript's weirdest type
Просмотров 26 тыс.11 месяцев назад
The empty object is TypeScript's weirdest type
Will this code error?
Просмотров 20 тыс.11 месяцев назад
Will this code error?
Don't put your types in .d.ts files
Просмотров 129 тыс.11 месяцев назад
Don't put your types in .d.ts files
var, const, let... now ‘using’?
Просмотров 228 тыс.11 месяцев назад
var, const, let... now ‘using’?
The TS Playground has PLUGINS
Просмотров 14 тыс.Год назад
The TS Playground has PLUGINS
TypeScript just unblocked React Server Components
Просмотров 32 тыс.Год назад
TypeScript just unblocked React Server Components
You're typing process.env wrong
Просмотров 56 тыс.Год назад
You're typing process.env wrong
Everyone's talking about ArkType
Просмотров 46 тыс.Год назад
Everyone's talking about ArkType
Everyone's talking about HOTScript
Просмотров 40 тыс.Год назад
Everyone's talking about HOTScript
This TS naming convention is weird
Просмотров 116 тыс.Год назад
This TS naming convention is weird
Should you still be using Redux in 2023?
Просмотров 52 тыс.Год назад
Should you still be using Redux in 2023?
Dan Abramov asked me to help fix React
Просмотров 33 тыс.Год назад
Dan Abramov asked me to help fix React
Codegen: The good, the bad and the ugly
Просмотров 30 тыс.Год назад
Codegen: The good, the bad and the ugly

Комментарии

  • @Y390R
    @Y390R 2 часа назад

    seems like using regexes doesn't narrow types down either, e.g. const isAlphaNumeric = (input: string | undefined) => input !== undefined && /^[a-z0-9]+$/i.test(input) won't return `input is string` but just `boolean`

  • @hamdaniash-siddiq5021
    @hamdaniash-siddiq5021 4 часа назад

    When Matt uploads a new video, we know it’s going to be a new useful knowledge. You’re awesome..❤

  • @andriiv7033
    @andriiv7033 6 часов назад

    But a type guard is absent

  • @marcinparda3403
    @marcinparda3403 8 часов назад

    What are advantages of namespaces over ComponentProps<T>? Or maybe it's just a curiosity?

  • @K.Huynh.
    @K.Huynh. 13 часов назад

    so cool, I am new to know React.ComponentProps

  • @zwanz0r
    @zwanz0r День назад

    Lol. The reason why `!!maybeNumber` doesn't work is that 0 is falsy 😅

    • @mattpocockuk
      @mattpocockuk День назад

      Lots of people are replying this, but that still means the type would be inferred correctly. It's just a subset of number instead of number. In an 'if' statement, this works. Why not trigger type predicate inference there?

    • @zwanz0r
      @zwanz0r День назад

      @@mattpocockuk yeah, also figured that after responding. I think maybe because Boolean is also a constructor? There might not be a way to type that yet (a constructor with a type guard as a side effect). Not sure about !!

  • @adamhenriksson6007
    @adamhenriksson6007 День назад

    I mean having tons of stuff in root_dir/dist seems a lot more preferable and sensible honestly. It seems a lot worse to have to chase down all the different build artifacts across node_modules every time you want to build from a clean slate. You kinda want your libs to be static and without artifacts. It's already a nightmare to debug dependency issues as it is.

    • @mattpocockuk
      @mattpocockuk День назад

      Outputs should be colocated with their inputs, no? Your setup sounds full of implicit dependencies.

    • @adamhenriksson6007
      @adamhenriksson6007 День назад

      ​@@mattpocockuk An example would be an orm-plugin for a node-backend. It makes sense to create the sqlite dev file as an artifact in root. Same for plugins generating json API specs consumed by docs endpoint generators like swagger. There are probably a lot more examples. As far as I know there is no way for libraries to generate a npm command in root package.json which invokes cleanup for its own (or all) package.json files in node_modules. This means that state in the tree is hidden making bugs really hard to track down until all problems are mysteriously solved when dev reinstalls node_modules. If npm has, or implements in the future, a standardized optional cleanup command that also invokes all package cleanup commands in node_modules, this problem might be solved given that library developers implement this new convention.

  • @AtomicCodeX
    @AtomicCodeX День назад

    Thank you for this I chose to use types even though I use c# on the backend But I use types cuz I was like fuck it, I’m not using inheritance 😆

  • @thisweekinreact
    @thisweekinreact День назад

    Great release 👌 Indexed access type narrowing is also cool

  • @yamogebrewold8620
    @yamogebrewold8620 День назад

    I would like the video to explain what Turbo is and why I would need it.

  • @GLObus303
    @GLObus303 День назад

    I think your audio does not sync with the video

  • @RedStone576
    @RedStone576 День назад

    commonjs is here to stay

  • @sudhansubhushanmishra
    @sudhansubhushanmishra День назад

    Congratulations on your book; I'm really looking forward to using the regular expression validation feature

  • @nazaka9904
    @nazaka9904 День назад

    cool feature, but it is still an inconvenience the name of namespace need to match the name of a component. That means you need to update both when refactoring code. Ideal behaviour would be giving the namespace a name and making it export the component by default i guess

    • @nazaka9904
      @nazaka9904 День назад

      nevermind, it will complicate code quite a bit

  • @MJW2291
    @MJW2291 День назад

    I think the namespace should also be exported. Can’t get this to work without also exporting the namespace.

    • @mattpocockuk
      @mattpocockuk День назад

      Nope, it works!

    • @adnanearef2959
      @adnanearef2959 День назад

      You will need the .ts file to be included in tsconfig.

    • @MJW2291
      @MJW2291 День назад

      It was. Not sure what’s weird about my setup but if I import MyComponent from a different ts file, MyComponent.Props doesn’t exist. Probably a weirdness with my setting but I haven’t had the time to make a clean reproducible setup for testing.

  • @adamlbarrett
    @adamlbarrett 2 дня назад

    Does exporting like that interfere with ComponentProps<T> ?

  • @CC-1.
    @CC-1. 2 дня назад

    how did you animate it?

  • @hakuna_matata_hakuna
    @hakuna_matata_hakuna 2 дня назад

    there is a d.ts file generation issue that's been open in tsup for months that this might fix

  • @yamogebrewold8620
    @yamogebrewold8620 2 дня назад

    I try to define explicit return types wherever applicable. It should be the default, just like all strict programming languages.

  • @sabinpandey
    @sabinpandey 2 дня назад

    waiting for the book

  • @onlinenk13
    @onlinenk13 2 дня назад

    Can we use it in a big project ? 🤔

  • @carlcarlinn7367
    @carlcarlinn7367 2 дня назад

    7:30 does not work because !!0 is false and !!1 is true

    • @mattpocockuk
      @mattpocockuk 2 дня назад

      I mean, it'll still filter to a subset of number - and this works in an 'if' statement. So I am a bit surprised that it doesn't work.