मुख्य सामग्री पर जाएँ
Skillpedia
सामान्य कोडिंग75k · #3068

typescript-strict-mode

यह क्या करती है

यह स्किल TypeScript प्रोजेक्ट की सेटिंग्स जाँचती है और सख़्त type जाँच चालू करती है। यह उन डेवलपर्स के लिए है जो चाहते हैं कि कोड चलने से पहले कंपाइलर ज़्यादा बग पकड़े।

कब इस्तेमाल करें

  • ✓जब TypeScript प्रोजेक्ट की tsconfig.json में कोई strict सेटिंग न हो।
  • ✓जब कोडबेस में null की गलतियाँ या implicit any types हों।
  • ✓जब नया TypeScript प्रोजेक्ट शुरू हो रहा हो और सबसे सुरक्षित सेटिंग्स चुननी हों।

Skill का लिंक

https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/typescript-strict-mode/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/typescript-strict-mode/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“मेरे पास एक TypeScript प्रोजेक्ट है। क्या आप मेरी tsconfig जाँचकर strict mode चालू कर सकते हैं, अगर वह सुरक्षित हो?”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

एजेंट tsconfig फ़ाइल पढ़ता है और देखता है कि कौन-से strict flags चालू हैं। जो छूटे हैं उन्हें चालू करता है, या अगर मौजूदा कोड में बहुत गलतियाँ हों तो उन्हें चरणों में चालू करता है।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

Enable TypeScript strict mode in tsconfig.json

Without strict mode, TypeScript allows implicit any types, ignores possible null/undefined values, and silently accepts unsound function assignments — meaning the type system gives a false sense of safety. Enabling strict mode makes TypeScript catch the bugs it was designed to prevent, turning type errors into compile-time failures rather than runtime surprises in production.

Quick Reference

  • "strict": true enables strictNullChecks, noImplicitAny, and six other checks
  • Enable strict from project start — retrofitting a large codebase is painful
  • On existing projects: enable strictNullChecks first, then other flags incrementally
  • Strict mode eliminates entire classes of null reference and implicit-any bugs

Check

Inspect the tsconfig.json in this project and report whether "strict": true (or individual strict flags) is enabled. List any missing strict flags.

Fix

Add "strict": true to the compilerOptions in tsconfig.json. If the project has existing type errors, explain how to enable strictNullChecks first as a stepping stone.

Explain

Explain what TypeScript strict mode enables, which individual flags it activates, and why each flag matters for catching real bugs.

Code Review

Check whether the codebase relies on implicit any, unchecked null access, or loose function type assignments that strict mode would reject. Flag the specific patterns and show what stricter types would look like.


For full implementation details, code examples, and framework-specific guidance, see references/rule.md.

Rule page: https://frontendchecklist.io/rules/javascript/typescript-strict-mode

अक्सर पूछे जाने वाले सवाल

strict mode क्या चालू करता है?

यह जाँचों का एक समूह चालू करता है, जिसमें strictNullChecks और noImplicitAny शामिल हैं, जो आम बग पकड़ते हैं।

अगर मेरे प्रोजेक्ट में बहुत type errors हों तो?

स्किल सुझाती है कि पहले strictNullChecks चालू करें, फिर बाकी flags एक-एक करके।

क्या शुरू से strict रखना आसान है?

स्किल कहती है कि शुरू से strict mode चालू करना बाद में बड़े प्रोजेक्ट में उसे जोड़ने से कहीं आसान है।

जानकारी

लेखक का मूल विवरण

Use when setting up a new TypeScript project, auditing an existing tsconfig.json, or reviewing code where null-reference errors or implicit any types are present.

repo: thedaviddias/Front-End-Checklist

लोकप्रियता

GitHub स्टार
75k
रैंकिंग में स्थान
#3068
लाइसेंस
MIT
अपडेट की गई
31/10/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

मिलती-जुलती skills