EasyEnv
TypeScript
शुरुआती

TypeScript

TypeScript end-to-end सीखें। Types, interfaces, generics, classes, modules, utility और mapped types, declaration files, और compiler।

18 पाठ7.7h हैंड्स-ऑन11 भाषाएँ
मुफ्त सीखना शुरू करेंTypeScript कोर्स

18 पाठ, क्रम में

  1. 1

    Hello, TypeScript

    यहाँ एक छोटा JavaScript प्रोग्राम है जो पूरी तरह ग़लत है, और JavaScript इसे ख़ुशी-ख़ुशी चला देगा:

    What TypeScript isTsc compile stepRunning a .ts fileThe play button
    20 मिनट
  2. 2

    Type Basics

    .ts फ़ाइल चलाना आपको आ गया है। अब बुनियादी ईंटों से मिलिए: वे प्रिमिटिव टाइप जो TypeScript के साथ ही आते हैं, और साथ में बचाव के वे दो रास्ते (any और...

    Primitive typesStringNumberBooleanNullUndefined+3
    25 मिनट
  3. 3

    Arrays and Tuples

    अकेला मान शायद ही कभी काफ़ी होता है। आपके पास तापमानों की सूची होती है, नामों की सूची, क़ीमतों की सूची। और जैसे ही सूची आती है, एक नई क़िस्म की ग़लती...

    Array typesReadonly arraysTuple typesFixed-length tuplesNamed tuple elements
    25 मिनट
  4. 4

    Object Types and Interfaces

    प्रिमिटिव और ऐरे से काफ़ी दूर तक काम चल जाता है, पर असल दुनिया के डेटा का कोई ढाँचा होता है: उपयोगकर्ता के पास नाम और उम्र होती है, अनुरोध के पास...

    Object literal typesInterface keywordRequired vs optional propertiesStructural typingExcess property checks
    25 मिनट
  5. 5

    Functions

    ज़्यादातर बग फ़ंक्शन में ही बसते हैं, और टाइप का सबसे बड़ा फ़ायदा भी वहीं मिलता है। किसी फ़ंक्शन का सिग्नेचर (उसके पैरामीटर और उसका रिटर्न टाइप) कॉल...

    Parameter typesReturn typesVoid returnDefault parametersRest parametersFunction type expressions+1
    25 मिनट
  6. 6

    Union and Literal Types

    कुछ मान एक ही चीज़ नहीं होते। उपयोगकर्ता ढूँढ़ने वाले फ़ंक्शन को या तो कोई मिलता है या नहीं मिलता। फ़ॉर्म का कोई फ़ील्ड या तो उपयोगकर्ता की टाइप की...

    Union typesString literal typesNumeric literal typesLiteral narrowing with as constUnion of object shapes
    25 मिनट
  7. 7

    Type Narrowing

    यूनियन कहता है "यह मान इन कई टाइप में से कोई एक है"। नैरोइंग (narrowing) कंपाइलर की वह प्रक्रिया है जिसमें वह आपकी लिखी हुई रनटाइम जाँचों के आधार पर...

    Typeof narrowingTruthiness narrowingEquality narrowingIn operator narrowingInstanceof narrowingDiscriminated unions+1
    30 मिनट
  8. 8

    Type Aliases vs Interfaces

    अब तक आप ऑब्जेक्ट के ढाँचे इनलाइन ही लिखते आए हैं, और चल भी गया क्योंकि ढाँचे छोटे थे। अब किसी असली कोडबेस से लिया गया यह फ़ंक्शन सिग्नेचर देखिए:

    Type aliasesInterface declarationsExtending interfacesIntersection typesDeclaration mergingWhen to pick which
    20 मिनट
  9. 9

    Optional, Readonly, and Nullable

    JavaScript में चलते समय आने वाली सबसे आम त्रुटि ऐसी दिखती है:

    Optional propertiesReadonly propertiesNon-null assertion operatorOptional chainingNullish coalescingStrictNullChecks
    25 मिनट
  10. 10

    Enums

    कुछ मान एक छोटी, तय सूची से आते हैं। ऑर्डर pending है, shipped है या delivered। लॉग की पंक्ति debug, info, warn या error होती है। दिशा ऊपर, नीचे,...

    Numeric enumsString enumsConst enumsEnums vs string literal unionsReverse mapping caveats
    20 मिनट
  11. 11

    Generics

    आपको एक ऐसा फ़ंक्शन चाहिए जो कोई ऐरे ले और उसका पहला एलिमेंट लौटा दे। आसान है:

    Generic functionsGeneric interfacesType parametersType inference for genericsBounded generics with extendsDefault type parameters
    30 मिनट
  12. 12

    Classes

    यह रहा एक बैंक खाता, सादे ऑब्जेक्ट के रूप में लिखा हुआ:

    Class declarationsConstructorsInstance propertiesAccess modifiers (public, private, protected)Readonly fieldsParameter properties+1
    25 मिनट
  13. 13

    Inheritance and Abstract Classes

    आपने किसी पेमेंट सिस्टम के लिए तीन क्लास लिखी हैं: CardPayment, BankTransfer और Voucher। तीनों में एक amount, एक currency और एक createdAt है। तीनों...

    Extends keywordSuper callsMethod overrideAbstract classesAbstract methodsImplements with interface
    25 मिनट
  14. 14

    Modules

    हर TypeScript फ़ाइल अपने आप में एक मॉड्यूल है। जिस क्षण किसी फ़ाइल में import या export आ जाता है, उसके ऊपरी स्तर के नाम ग्लोबल रहना बंद कर देते हैं...

    ES module syntaxNamed exportsDefault exportType-only importsRe-exportsModule resolution basics
    25 मिनट
  15. 15

    Utility Types

    TypeScript के साथ जेनरिक टाइप्स की एक छोटी सी लाइब्रेरी आती है, जो एक टाइप को इनपुट की तरह लेती है और बदला हुआ टाइप वापस लौटाती है। इनके नाम बहुत...

    Partial<T>Required<T>Readonly<T>Pick<T, K>Omit<T, K>Record<K, V>+2
    30 मिनट
  16. 16

    Mapped and Conditional Types

    अभी-अभी आपने जो यूटिलिटी टाइप इस्तेमाल किए (Partial, Pick, Record, ReturnType), वे सब भाषा की दो सुविधाओं से बने हैं: किसी ऑब्जेक्ट की कुंजियों और...

    Keyof operatorMapped types syntaxKey remapping with asConditional typesInfer keywordDistributive conditional types
    30 मिनट
  17. 17

    Declaration Files and Libraries

    आप कोई लाइब्रेरी इंस्टॉल करते हैं, उसे इम्पोर्ट करते हैं, और आपका एडिटर ऑटोकम्प्लीट, पैरामीटर के संकेत और हर लौटाए गए मान का ठीक-ठीक ढाँचा दिखाने...

    .d.ts filesDefinitelyTyped (@types packages)Ambient declarationsDeclare moduleTypeRoots and types option
    25 मिनट
  18. 18

    tsconfig and the Compiler

    tsconfig.json वही फ़ाइल है जिसे पढ़कर TypeScript का कंपाइलर तय करता है कि कंपाइल क्या करना है और कैसे। इसमें सौ से ज़्यादा विकल्प हैं, पर असली...

    Tsconfig.jsonStrict modeTarget and libModule and moduleResolutionOutDir and rootDirIncremental and watch+1
    30 मिनट

अपनी भाषा में TypeScript सीखें

हर पाठ, क्विज़ और ट्यूटर का जवाब आपकी भाषा में आता है। AI ट्यूटर उसी भाषा में जवाब देता है जिसमें आप पूछते हैं।

TypeScript हिन्दी में सीखें | TypeScript (Hindi) | Engineering Courses