Languages
TypeScript .gitignore
.gitignore for languages projects
.gitignore Content
# ============================================================================
# Created by https://gitignores.com/
# LANGUAGE-SPECIFIC TEMPLATE for TypeScript
# Website: https://www.typescriptlang.org/
# Repository: https://github.com/microsoft/TypeScript
# ============================================================================
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# TEMPLATE OVERVIEW & USAGE NOTES
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# • TEMPLATE TYPE: LANGUAGE-SPECIFIC TEMPLATE
# • PURPOSE: TypeScript compilation patterns for generated JavaScript files and build artifacts
# • DESIGN PHILOSOPHY: Modular - combine with common templates
# • COMBINATION GUIDANCE: Always combine with security and common templates
# • SECURITY CONSIDERATIONS: Does NOT include security patterns
# • BEST PRACTICES: Combine with common/security.gitignore, review patterns, test with your setup
# • OFFICIAL SOURCES: TypeScript documentation and community best practices
# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
# TYPE COMPILATION ARTIFACTS
# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
# TypeScript compilation outputs and build information files
*.tsbuildinfo
# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
# COMPILED JAVASCRIPT FILES
# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
# Generated JavaScript files from TypeScript compilation
*.cjs.map
*.js
*.js.map
*.mjs.map
# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
# TYPE DEFINITION FILES
# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
# Generated type definition files
*.d.ts
# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
# DEVELOPMENT TOOLS CACHE
# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
# Cache directories for TypeScript development tools
.jest/
.ts-jest/
.ts-node/
.tscache/
# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
# COMPILED OUTPUT DIRECTORIES
# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
# Common output directories for compiled TypeScript
build/
dist/
lib/
# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
# TESTING & QUALITY ASSURANCE ARTIFACTS
# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
# Test reports and coverage outputs
coverage-reports
coverage/
spec-reports
test-reports
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# TEMPLATE CUSTOMIZATION & BEST PRACTICES
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# 1. REVIEW: Examine all patterns before use
# 2. CUSTOMIZE: Adapt to your project's specific structure
# 3. TEST: Use `git check-ignore` to verify patterns work correctly
# 4. SECURE: Always protect sensitive data and credentials
# 5. UPDATE: Review periodically as technology evolves
# For comprehensive coverage, consider combining with:
# - Framework template if applicable (frameworks/*.gitignore)
# - Common security patterns (common/security.gitignore) - CRITICAL for protecting sensitive data
# - Common cache patterns (common/cache.gitignore)
# - Common build patterns (common/build.gitignore)
# - Common logs patterns (common/logs.gitignore)
# - IDE template for your editor (ides/*.gitignore)
# - OS template for your system (os/*.gitignore)
# EXAMPLE COMBINATION FOR TypeScript:
# cat languages/typescript.gitignore \
# common/security.gitignore \
# common/cache.gitignore \
# common/build.gitignore \
# common/logs.gitignore \
# ides/visual-studio-code.gitignore \
# os/macos.gitignore \
# os/windows.gitignore > .gitignore