TypeScript 5.2 की घोषणा
(devblogs.microsoft.com)Typescript 5.2 संस्करण जारी हो गया है.
usingdeclaration के ज़रिए explicit resource management- decorator metadata
- named या anonymous tuple elements
- array merge methods का उपयोग और आसान
- array copy methods
WeakMapऔरWeakSetkeys में symbol types (symbols) का समर्थन- TypeScript implementation file extensions में type-only import paths का समर्थन
- object members टाइप करते समय comma का auto-insertion
- inline variable refactoring (अगर कोई खास variable सिर्फ खास जगहों पर इस्तेमाल होता है, तो variable value को अपने-आप inject करके variable declaration हटा दी जाती है. IntelliJ-आधारित IDEs जैसा)
- Inlay parameter hints अब clickable हैं (parameter के बगल में parameter name को visually दिखाता है, और यह भी IntelliJ-आधारित IDEs जैसा है)
- incoming type compatibility checks का optimization (similar types analysis की speed में सुधार)
- इसके अलावा कई अन्य बदलाव और fixes
lib.d.ts(DOM types update)labeledElementDeclarationsproperty में unspecified (undefined) elements का समर्थनmoduleऔरmoduleResolutionproperties को Node.js environment settings के भीतर अनिवार्य रूप से match करना होगा- merged symbols के लिए consistent
exportchecks modulesहमेशाnamespaceform में emit होते हैं
2 टिप्पणियां
array को जोड़ने वाले method का इस्तेमाल करना आसान हो गया है
यह
array union (इसे हिंदी में क्या कहूँ, समझ नहीं आ रहा) method का इस्तेमाल करना आसान हो गया है
ज़्यादा उपयुक्त अभिव्यक्ति लगती है (हालाँकि यह भी कुछ अटपटी लगती है)