🚀 Chai aur TypeScript – Day 3 Today I learned how to set up TypeScript in a project using the proper approach. 🔑 Key Learnings: • Initialize project → npm init -y • Install TypeScript → npm install -D typescript • Setup config → npx tsc --init • Configure → rootDir: source, outDir: dist • Write code in .ts and compile using npx tsc • Run compiled JS using node • Use ts-node for development 💡 Big Insight: Always install TypeScript at the project level for better version control Hitesh Choudhary Chai Aur Code #ChaiAurTypescript #TypeScript #JavaScript #LearningInPublic #DeveloperJourney #ChaiCode
Setting up TypeScript in a Project
More Relevant Posts
-
🚀 Chai aur TypeScript – Day 5 Today I learned about Union types and the any type in TypeScript. 🔑 Key Learnings: • Union Types → allow multiple types Example: let id: string | number • Useful in real-world cases like API states pending | success | error • Helps define limited valid options (e.g., seat types: aisle, window, middle) • Any Type → allows any value but should be avoided 💡 Big Insight: Use unions for flexibility with safety, avoid any to maintain type checking #ChaiAurTypescript #TypeScript #JavaScript #LearningInPublic #DeveloperJourney #ChaiCode Hitesh Choudhary Chai Aur Code
To view or add a comment, sign in
-
-
I couldn't care less about Claude Code's source being leaked on npm. What terrifies me is that it's 512,000 lines of TypeScript code. HALF A MILLION lines of code for what's essentially a glorified API wrapper. I think the crucial point in our reality when we took the wrong turn was the invention of JavaScript. And we cemented our path to doom with the invention of TypeScript. Half a million lines of code. Dear Lord, have mercy on us.
To view or add a comment, sign in
-
TypeScript 6.0 just shipped. It's the last version built in JavaScript. New defaults across the board: strict mode on, ESM, ES2025 target. These match how most projects are already configured. One change worth flagging: types now defaults to []. TypeScript used to auto-include every @types package in node_modules. Now you list what you need. If your tsconfig never had an explicit types field, add "types": ["node"] before upgrading. TS 7.0 (the Go rewrite) is months out. This release is the bridge. Full announcement in comments. #TypeScript #WebDev
To view or add a comment, sign in
-
-
🚀 Chai aur TypeScript – Day 14 Today I learned about Type Declarations and how to use them with external libraries. 🔑 Key Learnings: • .d.ts files → provide type definitions (no runtime code) • @types → install types for external libraries • Used Axios with Generics for type-safe API responses • Handled errors properly using isAxiosError • import type → used for type-only imports • Compared Fetch vs Axios for API handling 💡 Big Insight: Proper type definitions make working with APIs safer and improve developer experience #ChaiAurTypescript #TypeScript #JavaScript #LearningInPublic #DeveloperJourney #ChaiCode Hitesh Choudhary Chai Aur Code
To view or add a comment, sign in
-
-
I Tested 15 Popular Libaries With TypeScript 7 Toolchain: Here’s How To Fix Broken Migration . . Two weeks ago TypeScript released it's version 6 which as per the announcement is the last version of TypeScript built on JavaScript. So I decided to test out TypeScript 7 with a monorepo where I had setup CI/CD and tested out 15 most popular libraries. After spending some good amount of time on it, I created a compatibility matrix to help you understand which solution works well. I have added a detailed breakdown of why TypeScript 7 currently fails for some libraries and how to work around it. [Link in the first comment] #javascript #typescript #nodejs #reactjs #software
To view or add a comment, sign in
-
-
🚀 Chai aur TypeScript – Day 10 Today I learned about Functions in TypeScript. 🔑 Key Learnings: • Define types for parameters (input) • Define return types (output) • void → function returns nothing • Optional parameters (?) → not required • Default parameters → provide initial values • Handle complex objects using types/interfaces 💡 Big Insight: Clear input and output types make functions safer and predictable #ChaiAurTypescript #TypeScript #JavaScript #LearningInPublic #DeveloperJourney #ChaiCode Hitesh Choudhary Chai Aur Code
To view or add a comment, sign in
-
-
A Live Admin Panel Without Writing JavaScript: Curling IO's admin area is a single Lustre server component running on the BEAM. One WebSocket connection, one long-lived Erlang process per session. Every interaction goes over that WebSocket and comes back as a DOM patch. The page never reloads, and there's no client-side JavaScript framework. The entire admin UI is written in Gleam, compiled to Erlang, and runs server-side. https://lnkd.in/eGwQ4aGx
To view or add a comment, sign in
-
-
Chai aur TypeScript – Day 11 🚀 Today I learned about Arrays, Tuples, and Enums in TypeScript. 🔑 Key Learnings: • Arrays → define types for elements • readonly → prevent modification • Tuples → fixed types with strict order • Can also be made readonly • Enums → define a fixed set of values • Useful for controlled options 💡 Big Insight: Using strict data structures makes code more predictable and safe #ChaiAurTypescript #TypeScript #JavaScript #LearningInPublic #DeveloperJourney #ChaiCode Hitesh Choudhary Chai Aur Code
To view or add a comment, sign in
-
-
👩💻 We built this in bootcamp with a professor walking us through it. I then decided to rebuild and upgrade it alone. The original was vanilla JavaScript + the OMDB API. It worked, but it was guided every step of the way. ⚙️ This time I upgraded it to React & TypeScript figuring out on the way what to change and why. ✨ Additional features that I added: – Favourites saved directly on the same page via localStorage – TypeScript to keep the data handling clean and intentional Turns out the best challenge after finishing a bootcamp is going back and doing it again, without a safety net. 🔗 Link: https://lnkd.in/eSXMHEKv #developerjourney #react #typescript #javascript
To view or add a comment, sign in
-
-
🚀 𝗧𝘆𝗽𝗲𝗦𝗰𝗿𝗶𝗽𝘁 𝟲.𝟬 𝗶𝘀 𝗼𝗳𝗳𝗶𝗰𝗶𝗮𝗹𝗹𝘆 𝗵𝗲𝗿𝗲 — 𝗮𝗻𝗱 𝗶𝘁'𝘀 𝗮 𝗵𝗶𝘀𝘁𝗼𝗿𝗶𝗰 𝗿𝗲𝗹𝗲𝗮𝘀𝗲. Dropped on March 23rd, TypeScript 6.0 is the last major version built on the JavaScript codebase. Starting with 7.0, the compiler is being rewritten in Go for native speeds and multi-threaded performance. Think: up to 10x faster builds. So what's in 6.0? Here are the highlights: • Strict: true is now ON by default — no more manually enabling it • Default target shifts to ES2025, default module to ESNext • Built-in Temporal API types — finally, a modern replacement for Date • Subpath imports with #/ under Node & bundler module resolution • Better type inference for contextually sensitive functions Follow me for more valuable content 💎
To view or add a comment, sign in
-
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development