Modern Full-Stack Development



Download 5,64 Mb.
Pdf ko'rish
bet62/107
Sana06.08.2021
Hajmi5,64 Mb.
#140576
1   ...   58   59   60   61   62   63   64   65   ...   107
Bog'liq
Modern Full-Stack Development Using TypeScript, React, Node

 Deleting  a Contact
Deleting a contact is the final bit of functionality this Worker must provide:
public async deleteContact(inID): Promise {
  await axios.delete(
    `${config.serverAddress}/contacts/${inID}`);
}
Well, that’s pretty simple, isn’t it? Here, you can see the contact’s ID added to the 
URL, as per our REST interface server design.
 Mirroring the Server Part 2: IMAP.ts
The second Worker to look at is in the IMAP.ts files. Just like with contacts, we begin with 
an interface:
export interface IMailbox { name: string, path: string }
And also, just like with contacts, this mimics the interface of the same name found in 
the server version of IMAP.ts. Similarly, we have the same IMessage interface as on the 
server too:
Chapter 9   Delivering the gooDs: MailBag, the Client


245
export interface IMessage {
  id: string, date: string, from: string,subject: string,
  body?: string
}
After that, the Worker class begins, and we have some methods to look at.

Download 5,64 Mb.

Do'stlaringiz bilan baham:
1   ...   58   59   60   61   62   63   64   65   ...   107




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish