Похожие чаты

Trust me, I'm an engineer What the fuck did just happen

here?!

17 ответов

7 просмотров

If i was in the TS team, i'd stop anything I am working on right now and work on error messages, it's so frustrating.

Thomas
But they're already so great

why not expected type X but got Y?

Ghazwan Aliesh
screenshot why not expected type X but got Y?

Argument of type X is not assignable to type Y

Ghazwan Aliesh
screenshot why not expected type X but got Y?

this is repeating the same error message in many lines.

Ghazwan Aliesh
screenshot why not expected type X but got Y?

Notice how it removes | undefined in the latter lines

Thomas
Notice how it removes | undefined in the latter li...

if they had removed the last two lines, how would that make the error message less informative?

Ghazwan Aliesh
screenshot why not expected type X but got Y?

You would just see ICurrentUser | undefined vs IGraphQLCurrencyTypes | undefined And you'd say "what the fuck? ICurrentUser is for sure compatible with IGraphCurrencyTypes, I'm sure they are, silly TypeScript"

Ghazwan Aliesh
screenshot why not expected type X but got Y?

But at the bottom you can see that IGraphQLCurrencyTypes is actually some kind of Enum, and ICurrentUser is an interface

Thomas
You would just see ICurrentUser | undefined vs IGr...

i can see clearly that IcurrentUser isn't IGQLcurrency

Thomas
How?

they have different names, and they caused error, this means they don't match.

Похожие вопросы

Обсуждают сегодня

А еще в перле можно уже @arr1 + @arr2?
Sergei Zhmylove
53
I arrived here after a Chico Crypto show highlighted the project & the Team - the fact that the Team had a long history of successfully working with household names gave me e...
Banter is Bullish
1
Привет всем. появился вопрос. Разрабатываю сайт, в данный момент он запущен. Хостинг beget. Добавляю на сайт яндекс метрику с помощью полей client-settings (взято отсюда http...
Andrew
2
;.686 ;Система команд процессора 686 ;.MODEL FLAT,stdcall ;Модель памяти плоская, стандартный ;вызов процедуры ;option casemap:no...
Егор Анелькин
1
я не магистр хаскеля, но разве не может лейзи тип конвертнуться в не-лейзи запросив вычисление содержимого прям при инициализации?
deadgnom32 λ madao
100
Почему у макбука экран не сенсорный?
✨ Anatolii Cherednichenko
28
а как ловят такое ghci> res <- getPos2 urlt 0 (alist !! 0) 200 ghci> res SearchAtom (Search "www.google.com" "/search?q=" "Haskell") "haskell.org" (SearchTS [(2024-05-06 07:...
Fedor
14
Is it a good price to buy hex now on 0,0019?
Patrick
29
ну выйграл ты ее а дальше что?
central hardware
17
Ребята, а из API геокодеров (по адресам в РФ) что сейчас актуального и есть ли среди актуального бесплатное/с нормаотным лимитом запросов? ситуация простая - на сайте периоди...
Dreamer_0x01 VeseloV
8
Карта сайта