Using DECLARE GLOBAL for amazing inference - Advanced TypeScript

preview_player
Показать описание
Become a TypeScript Wizard with Matt's upcoming TypeScript Course:

Follow Matt on Twitter

Рекомендации по теме
Комментарии
Автор

I was really confused about how the GlobalReducerEvent was being inferred on event at first, because you only showed GlobalReducer at the end. Had to watch a couple times before I realized 😂

jcollins
Автор

Man do you have a nice way of talking. Clear and well articulated.

SuperQuwertz
Автор

A bit too advanced for me. Maybe provide a little bit of background or context. It is unclear what is trying to be achieved here.

Автор

This looks like a really nice way to implement a “pluggable” factory pattern

ChrisPepper
Автор

Wondering if this could be handled without a global declaration, since all interfaces are extensible by their nature with declaration merging.

Автор

Not sure if I just understood that right or not, but does that mean you can use 'interface' merging to update 'type' declarations on the fly? That sounds super cool!

offroaders
Автор

I really don't understand what problem you are trying to solve

yadusolparterre
Автор

whats the vscode keyboard shortcut to switch to other files in same directory at 1:13?

gno
Автор

its pretty cool
but is it really necesery

smatsri
Автор

You are assuming I have a lot of prerequisite knowledge my friend. I didn't understand a word you said.

editin
Автор

Very odd the way you left the definition of GlobalReducer to the end. It’s a short video so it’s not the end of the world having to watch it twice to understand it, but also a bit unnecessary.

PeteC
Автор

Sorry but this video is completely useless. What does "access typescript's global scope" mean? What is the global scope? What use case does it generally satisfy? What is the application of this reducer pattern? Why after only introducing the type GlobalReducer is it in any way helpful to define a "GlobalReducerEvent" interface and suddenly have typed parameters? I understand nothing about this video...

scalex