TypeScript? ?? ? ?? ??
??
??? ??? JavaScript ?? ??? TypeScript? JavaScript ??? ??? ?? ?? ??? ?????. ??? ??? ???? ??? ??? ???? ?? ??? ? ?? ??? ???? ? ??? ???. TypeScript? ??? ?? ??? Union Types ? Intersection Types? ????. ??? ??? ??? ??? ??? ? ???? ???? ???? ?? ??? ??????? ?? ??? ? ????.
? ??? ??? TypeScript? ?? ??? ?? ??? ??? ???? ????. ??? ??? ???? ?? ??? ?? ?? ??? ???? ??? ???? ?? ??? ???????. ? ??? ??? TypeScript ?????? ??? ??? ????? ???? ??? ???? ???? ? ????.
?, ? ?? ???? ?? ?? ??? ?????.
?? ??
??? ? ?? ????.
https://www.picturepunches.com/meme/317642
???? ???? ??? ????. ???? ??? ?? ???, ???? ??? ?? ???. ??? ??? ??? ?? ?? ???? ??? ?????. ? ?? ??? ??? ???. ???? ???? ?? ???? ?? ?? ?? ???. ??, ??, ??? ??? ???? ? ?? ??? ?? ?? ?? ?? ????. ???? ??, ??, ??? ??? ???? ? ???? ?? ?? ??? ?? ?? ????? ??? ??? ??? ?? ?????.
?, ?? ? ??? ??? ??? ??? ?????.
Dont ask 1 | Dont ask 2 | Should ask 1 | Should ask 2 | |
---|---|---|---|---|
Man | Salary | Relationship | Address | Full name |
Woman | Age | Weight | Address | Full name |
TypeScript??? ??? ?? ??? ?? ? ????.
type Person = { gender: 'man' | 'woman', dontAsk: 'salary' | 'relationship' | 'age' | 'weight' };
Person ??? ???? ??? ??? ? ???? ??
const person1: Person = { gender: 'man', dontAsk: 'weight', }; const person2: Person = { gender: 'woman', dontAsk: 'salary', };
?? ? ?? ?? ?? ??? ???? ????.
? ??? ???? ?? Intersection? Union ??? ?????.
??? ??
Union Type? ???? ??? ?? ?? ? ??? ? ? ????. ??? ????:
{ gender: 'man', dontAsk: 'salary' | 'relationship' } | { gender: 'woman', dontAsk: 'weight' | 'size' }
?? ??? ? ????? ??? ?? ? ?? ?? ? ??? ? ??? ?????.
- ??? 'man'?? dontAsk? '??' ?? '??'? ?????.
- ??? '??'?? dontAsk? '??' ?? '??'? ?????.
??? ???? ??? ??? ?? ? ?? ???? ??? ? ?????.
??? ??
?? ??? ?? ??? ??? ?????. ?? ??? ??? ?? ?? ??? ???? ???. ??? ????:
& { address?: string, fullName: string }
?? ??? ? ???? ??? ??? ???? ??? ???? ????.
- ??? ??? ??? ?? ?????.
- ??? ??? ?? fullName ?????.
Union ? Intersection ?? ??
??? ?? ??? ?? ??? ?? ??? ?? ?????.
type Person = ({ gender: 'man', dontAsk: 'salary' | 'relationship' } | { gender: 'woman', dontAsk: 'weight' | 'age' }) & { address?: string, fullName: string };
Person ??? ?? ?? ? ??? ???? ?? ?? ??? ??? ??? ???? ???. ??? Person ??? ??? ????.
const person1: Person = { gender: 'man', dontAsk: 'salary', fullName: 'John Doe' }; const person2: Person = { gender: 'woman', dontAsk: 'weight', fullName: 'Jane Doe', address: '123 Main St' };
person1? ??? ?? ??? ???? ??? ?????. TypeScript ?? ??? ??? Visual Studio Code??? ??? ???? ??? ?????.
??
TypeScript???Union Types???? ?? ?? ? ??? ? ? ??? ???? ??,?Intersection Types??? ??? ??? ?????. ??? ??? ???? ???? ?? ???? ??? TypeScript ??? ??? ? ????. Person ?? ?? ??? ??? ???? ???? ??? ?? ??? ??? ??? ?????.
TypeScript? ????? ???? ?? ?? ???? ?? ??? ? ????. ??? ???? ?? ???? ??? ?? ??? ?? ? ??? ???? ?? ???. ?? ??? ???? ?? ????? ??? ??? ???? ? ???? ???? ??? ?? ? ????.
? ??? TypeScript? ?? ? ?? ??? ?? ?????. ??? ??? PHP ??? ????? ?? ?? ??? ?????!

? AI ??

Undress AI Tool
??? ???? ??

Undresser.AI Undress
???? ?? ??? ??? ?? AI ?? ?

AI Clothes Remover
???? ?? ???? ??? AI ?????.

Clothoff.io
AI ? ???

Video Face Swap
??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

?? ??

??? ??

???++7.3.1
???? ?? ?? ?? ???

SublimeText3 ??? ??
??? ??, ???? ?? ????.

???? 13.0.1 ???
??? PHP ?? ?? ??

???? CS6
??? ? ?? ??

SublimeText3 Mac ??
? ??? ?? ?? ?????(SublimeText3)

Node.js?? HTTP ??? ???? ? ?? ???? ??? ????. 1. ?? ????? ????? ??? ??? ? ?? ????? ?? ?? ? https.get () ??? ?? ??? ??? ? ?? ????? ?? ??? ?????. 2.axios? ??? ???? ? ?? ??????. ??? ??? ??? ??? ??? ??? ???/???, ?? JSON ??, ???? ?? ?????. ??? ?? ??? ????? ?? ????. 3. ?? ??? ??? ??? ??? ???? ???? ??? ??? ???? ?????.

JavaScript ??? ??? ?? ?? ? ?? ???? ????. ?? ???? ???, ??, ??, ?, ???? ?? ? ??? ?????. ?? ????? ?? ?? ? ? ??? ????? ?? ??? ??? ????. ??, ?? ? ??? ?? ?? ??? ??? ??? ???? ??? ??? ???? ??? ?? ??? ????. ?? ? ????? ??? ???? ? ??? ? ??? TypeofNull? ??? ?????? ??? ? ????. ? ? ?? ??? ???? ?????? ????? ???? ??? ???? ? ??? ? ? ????.

?????, JavaScript ???! ?? ? JavaScript ??? ?? ?? ?????! ?? ?? ??? ??? ??? ? ????. Deno?? Oracle? ?? ??, ??? JavaScript ?? ??? ????, Google Chrome ???? ? ??? ??? ???? ?????. ?????! Deno Oracle? "JavaScript"??? ????? Oracle? ?? ??? ??? ??????. Node.js? Deno? ??? ? Ryan Dahl? ??? ?????? ???? ????? JavaScript? ??? ???? Oracle? ????? ???? ?????.

Cacheapi? ?????? ?? ???? ??? ???? ???, ?? ??? ??? ?? ???? ? ??? ?? ? ???? ??? ??????. 1. ???? ????, ??? ??, ?? ?? ?? ???? ???? ??? ? ????. 2. ??? ?? ?? ??? ?? ? ? ????. 3. ?? ?? ?? ?? ?? ??? ??? ?? ?????. 4. ??? ???? ?? ?? ???? ?? ?? ?? ?? ?? ???? ?? ?? ??? ??? ? ????. 5. ?? ???? ??, ??? ??? ? ??? ??, ?? ??? ? ?? ???? ???? ???? ? ?? ?????. 6.?? ??? ?? ?? ?? ??, ???? ?? ? HTTP ?? ????? ?????? ???????.

??? JavaScript?? ??? ??? ?????? ?? ???????. ?? ??, ?? ?? ? ??? ??? ?? ????? ????? ?????. 1. ?? ??? ??? ????? ???? ??. ()? ?? ??? ??? ?????. ?. ()? ?? ??? ?? ??? ??? ?? ? ? ????. 2. ?? ??? .catch ()? ???? ?? ??? ??? ?? ??? ??????, ??? ???? ???? ????? ??? ? ????. 3. Promise.all ()? ?? ????? (?? ?? ?? ? ??????? ??), Promise.Race () (? ?? ??? ?? ?) ? Promise.AllSettled () (?? ??? ???? ??)

.map (), .filter () ? .reduce ()? ?? JavaScript ?? ?? ???? ??? ??? ??? ? ? ????. 1) .map ()? ??? ??? ??? ???? ? ??? ???? ? ?????. 2) .filter ()? ???? ??? ????? ? ?????. 3) .reduce ()? ???? ?? ??? ???? ? ?????. ???? ??? ????? ??? ?? ?? ??? ?????.

JavaScript? ??? ??? ?? ??, ? ? ? ?? ???? ???? ??? ??? ?????. 1. ?? ??? ?? ??? ???? ??? ??? ??? ??? ?? WebAPI? ?????. 2. WebAPI? ??????? ??? ?? ? ? ??? ?? ??? (??? ?? ?? ???? ??)? ????. 3. ??? ??? ?? ??? ?? ??? ?????. ?? ??? ??? ????? ??? ??? ?? ? ???? ?????. 4. ???? ?? (? : Promise. 5. ??? ??? ???? ?? ???? ???? ?? ?? ?? ??? ????? ? ??????.

??? ??? ?? ???? ?? ??? ???? ?? ??? ??? ?? ??? ?? ??? ?????. 1. ??? ?? : ?? ??? ?? ? ? ???? ?? ??? ???? ??? ???? ??????. ?? ??, ??? ?? ? ? ?? ??? ?? ? ?? ??? ??????. 2. ??? ?? : ??? ???? ?? ?? ??? ?? ???? ????? ? ?? ?????? ???? ????? ? ?? ?? ??? true? ??????. 3. ?? ???? ?? ?? ??? ?? ??, ?? ??? ? ?? ???? ?????. 4. DOM ??? ???? ??, ?? ? ??? ? ??? ??? ?? ???? ?? ???? ?????.
