Ravshan’s blog


Channel's geo and language: not specified, not specified
Category: not specified


Dasturlash boyicha video darslar, subyektiv fikrlar, kundalik misollar, bahsli mavzular.
Youtube kanal: https://www.youtube.com/@ravshansbox
Muallif: @ravshansbox

Related channels  |  Similar channels

Channel's geo and language
not specified, not specified
Category
not specified
Statistics
Posts filter




Quyidagi qatorning nanijasi qanday bo'ladi: console.log(Object.keys([1,2,3]));
Poll
  •   [0, 1, 2]
  •   ['0', '1', '2']
  •   [1, 2, 3]
  •   ['1', '2', '3']
208 votes


TypeScript through docs: Generics

https://youtu.be/4_DXeWUscf4








Funksional dasturlashda "Function Composition" tushunchasi bilan tanishib chiqamiz

https://youtu.be/OpO5Hrp77Z8


Funksional dasturlashdagi "Currying" tushunchasi bilan tanishib chiqamiz

https://youtu.be/WwfoUoUUWkg


Updating packages

Eskirgan paketlarni korish uchun:
npm outdated

Ularni "upgrade" qilish uchun:
npx npm-check-updates -i

ishlatishingiz mumkin

#tips_and_tricks

1.3k 0 14 16 32



Consoleda nima chiqadi? console.log(Boolean('true'), Boolean('false'));
Poll
  •   false false
  •   false true
  •   true false
  •   true true
395 votes




YouTubeda 1000ta bo'ldik 🎉




Zed for Linux

Linux foydalanuvchi dasturchilarga hushxabar. Zed linuxga ham release bo'ldi (to'g'risi o'zim tekshirib ko'rishga imkoniyatim bo'lmadi).

https://zed.dev/linux


Rewrite git history

Adashib asosiy branchga commit va push qilib qoydingiz mi? Havotirga o’rin yo’q, quyidagicha orqaga qaytaramiz:

git checkout main
git reset --soft HEAD

git push origin main --force

git checkout new-branch
git add .
git commit -m "commit to new branch"
git push origin new-branch




Keyingi post yoki videolar nima haqida bo’lishini hohlardiz?
Poll
  •   JavaScript
  •   TypeScript
  •   React
  •   Testing
383 votes


AbortSignal va AbortController

AbortSignal/AbortController interfacelari async operasiyalarni tohtatish uchun ishlatiladi. Masalan, juda ko'p ishlatiladigan fetch() funksiya RequestInit parameter(object)ga signal nomli property kutadi (optional) va biz bu propertyga AbortSignal instance berishimiz mumkin. Va keyinroq bu AbortController instancening .abort() methodini chaqirib requestni tohtatishimiz mumkin.

AbortSignal qabul qiladigan APIlar:
- Fetch
- EventTarget API
- ReadableStream/WritableStream
- WebSocket

AbortSignal instance odatda AbortControllerda saqlanadi, uni new AbortController() qilib yaratamiz, lekin uni AbortSignal static methodlari orqali ham yaratishimiz mumkin. Bular:
- AbortSignal.abort() - Allaqachon abort qilingan instance yaratadi.
- AbortSignal.any() - Parameterga AbortSignallardan tashkil topgan iterable oladi va ulardan biri abort bolganda bu ham abort boladi.
- AbortSignal.timeout() - Parameterda berilgan millisekund qiymatda avtomat abort boladigan instance qaytaradi (Backenddan kutilayotgan javobga timeout qoyish uchun juda qulay)


VSCodeda importlar va xatolarni tuzatish

Skrindagi config vscodeda importlar bilan ishlashni qulaylashtiradi, yozilgan amallar file saqlanayotganda yozilgan ketma-ketlikda bajariladi:
- Avval ishlatilmagan importlar olib tashlanadi;
- Keyin yetishmaydigan importlar qoshib chiqiladi (tekshirish kerak bolishi mumkin, agar birdan kop import bolsa malum qoidalarga ko'ra birinchisi tanlanadi);
- Keyin importlar malum qoidalarga qarab sort qilinadi;
- Oxirida linter (eslint, stylelint...) xatolar tuzatiladi.

PS: .vscode/settings.json fileni gitga qoshsa teamdagi hamma vscode foydalanuvchilariga foydali boladi

20 last posts shown.

1 481

subscribers
Channel statistics