Typescript Tips
  • Typescript Tips
  • docs
    • Contributor Covenant Code of Conduct
    • Contribution Guidelines
    • Deploy to Github Page Typescript Tips | typescript-tips
  • notes
    • Carlillo - 1591148366070747347
    • Steve8708 - 1605322303319199744
    • erikras - 1457999235564154882
    • housecor - 1581638360543600640
    • housecor - 1586865516395876359
    • housecor - 1596861970170671104
    • kulkarniankita9 - 1594154991148597250
    • mattpocockuk - 1506607945445949446
    • mattpocockuk - 1509850662795989005
    • mattpocockuk - 1509964736275927042
    • mattpocockuk - 1512388535692652547
    • mattpocockuk - 1536670032360611840
    • mattpocockuk - 1542079199543975937
    • mattpocockuk - 1590333383501979649
    • mattpocockuk - 1591047557702389760
    • mattpocockuk - 1592130978234900484
    • mattpocockuk - 1593584053042630657
    • mattpocockuk - 1598708710523772929
    • mattpocockuk - 1638562171863834625
    • mgechev - 1309379618034642946
    • mgechev - 1361186013029269506
    • mgechev - 1462654597059817481
    • sebastienlorber - 1512420374201446405
    • stackblitz - 1325818478675304448
    • stackblitz - 1328353096179789824
    • stackblitz - 1330890655351123968
    • sulco - 1160890708615716864
    • sulco - 1222507593287028736
    • wesbos - 1524040757518258176
    • wesbos - 1582803702225989637
    • wesbos - 1583093975359315968
    • wesbos - 1584905090628034560
    • wesbos - 1585258976421224450
    • wesbos - 1585641232155348992
    • wesbos - 1587082842110033926
    • wesbos - 1615777112408866832
Powered by GitBook
On this page
  1. notes

mattpocockuk - 1536670032360611840

Previousmattpocockuk - 1512388535692652547Nextmattpocockuk - 1542079199543975937

Last updated 1 year ago

Matt Pocock 🏖️ () - June 14, 2022 at 7:21 PM

🔥 TypeScript Tip #24 🔥

Deriving vs Declaring is key to getting the most inference out of your types with as few lines of code as possible.

But sometimes, you want to ensure that some code conforms to a type without losing its literal values.

Enter satisfies()() 👀

https://user-images.githubusercontent.com/870029/206738005-1cda2b29-582e-4d87-b714-daad4383d7ef.mp4

@mattpocockuk
pic.twitter.com/j8a9ahdesI
Download mp4
Tweet link
mattpocockuk