<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: youxufkhan</title>
    <description>The latest articles on DEV Community by youxufkhan (@youxufkhan).</description>
    <link>https://dev.to/youxufkhan</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1462371%2Fadefdda4-a468-4875-acb7-fc156c6874a3.jpeg</url>
      <title>DEV Community: youxufkhan</title>
      <link>https://dev.to/youxufkhan</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/youxufkhan"/>
    <language>en</language>
    <item>
      <title>Cutting Through the Noise: The 2026 AI Coding Subscription Guide</title>
      <dc:creator>youxufkhan</dc:creator>
      <pubDate>Sun, 28 Jun 2026 14:56:07 +0000</pubDate>
      <link>https://dev.to/youxufkhan/cutting-through-the-noise-the-2026-ai-coding-subscription-guide-2kb4</link>
      <guid>https://dev.to/youxufkhan/cutting-through-the-noise-the-2026-ai-coding-subscription-guide-2kb4</guid>
      <description>&lt;p&gt;AI coding tools are no longer just autocomplete widgets. In 2026, they are agentic ecosystems running complex multi file edits, terminal commands, and automated code reviews. The pricing model has changed completely. Many major platforms have abandoned flat fee unlimited access in favor of credit-based or rolling limit pricing.&lt;/p&gt;

&lt;p&gt;If you're trying to figure out which subscription is actually worth your money, this guide compares the cost, performance, and limits of the leading AI coding plans.&lt;/p&gt;




&lt;h2&gt;
  
  
  The 2026 Subscription Landscape at a Glance
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Platform / Plan&lt;/th&gt;
&lt;th&gt;Price (USD)&lt;/th&gt;
&lt;th&gt;Quota &amp;amp; Limits&lt;/th&gt;
&lt;th&gt;Primary Models&lt;/th&gt;
&lt;th&gt;Best For&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;OpenCode Go&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;$10/month ($5 first month)&lt;/td&gt;
&lt;td&gt;Generous 5-hour rolling request limits&lt;/td&gt;
&lt;td&gt;DeepSeek V4, Qwen3.7 Max, Kimi K2.7 Code&lt;/td&gt;
&lt;td&gt;Budget-conscious developers&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;OpenCode Zen&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Pay-as-you-go ($20 start)&lt;/td&gt;
&lt;td&gt;Zero markup, per-request billing&lt;/td&gt;
&lt;td&gt;Curated &amp;amp; tested coding models&lt;/td&gt;
&lt;td&gt;Developers who hate subscriptions&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Kilo Pass&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;From $19/month&lt;/td&gt;
&lt;td&gt;1:1 paid credits + up to 50% bonus credits&lt;/td&gt;
&lt;td&gt;500+ models via API/IDE&lt;/td&gt;
&lt;td&gt;Power users looking to maximize credit value&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Kilo Individual&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;$0/month&lt;/td&gt;
&lt;td&gt;Bring Your Own Keys (BYOK), no platform markup&lt;/td&gt;
&lt;td&gt;Bring your own API keys&lt;/td&gt;
&lt;td&gt;Developers who want a free open-source IDE setup&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;GitHub Copilot Pro&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;$10/month&lt;/td&gt;
&lt;td&gt;Unlimited autocomplete + $10 in AI Credits&lt;/td&gt;
&lt;td&gt;Custom GitHub Models, OpenAI, Anthropic&lt;/td&gt;
&lt;td&gt;Standard devs inside VS Code/GitHub ecosystem&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;GitHub Copilot Max&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;$100/month&lt;/td&gt;
&lt;td&gt;Unlimited autocomplete + $100 in AI Credits&lt;/td&gt;
&lt;td&gt;Custom GitHub Models, OpenAI, Anthropic&lt;/td&gt;
&lt;td&gt;High-volume professional agent usage&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Mistral Vibe Pro&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;$14.99/month ($5.99 for students)&lt;/td&gt;
&lt;td&gt;Unlimited coding chat &amp;amp; async sandboxes&lt;/td&gt;
&lt;td&gt;Mistral Medium 3.5&lt;/td&gt;
&lt;td&gt;Devs needing cloud-teleported agents&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;ChatGPT Go&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;$8/month (Ad-supported)&lt;/td&gt;
&lt;td&gt;Higher basic limits (no reasoning/Deep Research)&lt;/td&gt;
&lt;td&gt;GPT-5.2 Instant&lt;/td&gt;
&lt;td&gt;Casual users, lightweight scripting&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;ChatGPT Plus&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;$20/month&lt;/td&gt;
&lt;td&gt;Standard rate limits for advanced reasoning&lt;/td&gt;
&lt;td&gt;GPT-5.5, Deep Research&lt;/td&gt;
&lt;td&gt;Developers needing general reasoning + coding&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Kimi Membership&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;$19/month&lt;/td&gt;
&lt;td&gt;High-volume swarms &amp;amp; document-to-skill processing&lt;/td&gt;
&lt;td&gt;Kimi K2.6, Agent Swarms&lt;/td&gt;
&lt;td&gt;Visual dev (websites, slides) &amp;amp; swarm tasks&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;MiniMax Token Plan&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;From $20/month (Tiers up to $120/mo)&lt;/td&gt;
&lt;td&gt;rolling 5-hour request windows (3 to 7 agents)&lt;/td&gt;
&lt;td&gt;MiniMax M3, frontier models&lt;/td&gt;
&lt;td&gt;Devs building parallel agent loops&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  1. The Credit Pioneers: Kilo &amp;amp; GitHub Copilot
&lt;/h2&gt;

&lt;p&gt;Credit-based usage is the dominant billing method for AI coding in 2026. Instead of flat-rate chat, you pay for what you consume.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;GitHub Copilot: The Transition to AI Credits&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;GitHub Copilot has split its billing into two tracks: &lt;strong&gt;unlimited basic autocomplete&lt;/strong&gt; and &lt;strong&gt;usage-based AI Credits&lt;/strong&gt; for advanced tasks (such as Copilot Chat, agents, and automated PR reviews).&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Copilot Pro ($10/mo):&lt;/strong&gt; Gives you unlimited completions plus $10 in AI Credits.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Copilot Pro+ ($39/mo):&lt;/strong&gt; Comes with $39 in AI Credits.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Copilot Max ($100/mo):&lt;/strong&gt; Designed for heavy agent developers, offering $100 in AI Credits.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Copilot Business ($19/user/mo) &amp;amp; Enterprise ($39/user/mo):&lt;/strong&gt; Uses a pooled credit system. All credits are shared across your team rather than being locked to individual seats. If the pool runs dry, you pay $0.01 per additional AI credit, or you can set hard spend caps.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The Verdict:&lt;/strong&gt; If you only need inline autocomplete, the $10/mo Pro plan remains a bargain. But if you rely heavily on Copilot Workspace or automated reviews, the credits can vanish quickly, making the pooled Business plan or Kilo a more logical choice.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Kilo: The Zero-Markup BYOK Champion&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Kilo takes a completely transparent approach. If you bring your own API keys (from OpenAI, Anthropic, Google, etc.), &lt;strong&gt;Kilo is $0/month&lt;/strong&gt; for individuals. They charge no markup on the underlying model provider rates.&lt;/p&gt;

&lt;p&gt;If you prefer a subscription, Kilo offers &lt;strong&gt;Kilo Pass&lt;/strong&gt; (Starter at $19/mo, Pro at $49/mo, Expert at $199/mo).&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Your monthly fee converts &lt;strong&gt;1:1 into usage credits&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;  Kilo stacks free bonus credits on top: up to &lt;strong&gt;40% extra value&lt;/strong&gt; for monthly plans and &lt;strong&gt;50% extra value&lt;/strong&gt; for annual plans.&lt;/li&gt;
&lt;li&gt;  All first-time subscribers get a &lt;strong&gt;50% welcome bonus&lt;/strong&gt; in Month 1.&lt;/li&gt;
&lt;li&gt;  &lt;em&gt;Catch:&lt;/em&gt; Bonus credits expire at the end of your monthly billing cycle, while paid credits roll over.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The Verdict:&lt;/strong&gt; Kilo is arguably the most user-friendly model on the market. They make their money by charging teams for security and collaboration, meaning individual developers get raw developer-rate access with massive bonus structures.&lt;/p&gt;




&lt;h2&gt;
  
  
  2. The Rolling Limit Giants: OpenCode Go vs. Zen
&lt;/h2&gt;

&lt;p&gt;OpenCode has emerged as a major player by offering two distinct paths for developers: flat-rate subscriptions with request windows or zero-subscription pay-as-you-go.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;OpenCode Go: The High-Volume Subscription&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;For &lt;strong&gt;$10/month&lt;/strong&gt; ($5 for your first month), OpenCode Go offers rolling 5-hour request limits across a suite of frontier models.&lt;/p&gt;

&lt;p&gt;The request limits are highly generous:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;DeepSeek V4 Flash:&lt;/strong&gt; 31,650 requests / 5 hours (essentially unlimited for human speeds)&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;MiniMax M3:&lt;/strong&gt; 9,600 requests / 5 hours (includes a 3x usage promo)&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;DeepSeek V4 Pro:&lt;/strong&gt; 3,450 requests / 5 hours&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Qwen3.7 Plus:&lt;/strong&gt; 4,300 requests / 5 hours&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Kimi K2.7 Code:&lt;/strong&gt; 1,150 requests / 5 hours&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Qwen3.7 Max:&lt;/strong&gt; 950 requests / 5 hours&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;GLM-5.2:&lt;/strong&gt; 880 requests / 5 hours&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The Verdict:&lt;/strong&gt; OpenCode Go is the best value plan for individual developers. For just $10/mo, you get access to top-tier reasoning models like Qwen3.7 Max and DeepSeek V4 Pro with limits you'll almost never hit in normal daily coding.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;OpenCode Zen: Pay-As-You-Go Gateway&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;If you hate monthly bills, OpenCode Zen requires a &lt;strong&gt;$20 minimum deposit&lt;/strong&gt; (plus a $1.23 card fee). It bills you only for the tokens you use with zero markup. It automatically tops up another $20 when your balance drops below $5.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Verdict:&lt;/strong&gt; Zen is perfect for developers who want a backup coding assistant or want to test specific open-source models without committing to a recurring fee.&lt;/p&gt;




&lt;h2&gt;
  
  
  3. The Ecosystem Contenders: Mistral Vibe, Kimi, &amp;amp; OpenAI
&lt;/h2&gt;

&lt;p&gt;If you want a unified experience where the interface, CLI, and model are tightly integrated, these three options offer distinct agentic workflows.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Mistral Vibe: Cloud Teleportation&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Mistral has rebranded Le Chat as &lt;strong&gt;Vibe&lt;/strong&gt;. For &lt;strong&gt;$14.99/month&lt;/strong&gt; (and only $5.99/mo for verified students), Vibe offers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Code Mode:&lt;/strong&gt; Built for terminal and VS Code project-wide feature building.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Teleporting Agents:&lt;/strong&gt; You can launch a coding task in Vibe, spin it up in an isolated cloud sandbox, and let it run asynchronously while you close your laptop. It will notify you with the finished diffs or PRs.&lt;/li&gt;
&lt;li&gt;  Powered by &lt;strong&gt;Mistral Medium 3.5&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The Verdict:&lt;/strong&gt; Vibe's async cloud execution makes it the most advanced workflow for running long-horizon agent tasks without locking up your local terminal. At $14.99/mo, it is highly competitive.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;ChatGPT Go &amp;amp; Codex CLI&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;OpenAI has integrated its Codex engine directly into the ChatGPT ecosystem.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;ChatGPT Go ($8/mo):&lt;/strong&gt; Ad-supported, basic coding features using GPT-5.2 Instant. It doesn't support advanced reasoning models or Deep Research.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;ChatGPT Plus ($20/mo):&lt;/strong&gt; Full coding access, GPT-5.5, and OpenAI's Deep Research.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Codex CLI:&lt;/strong&gt; The terminal-native agent is available across all plans (including Free).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The Verdict:&lt;/strong&gt; ChatGPT Go is too limited for professional developers. If you want OpenAI's best coding capabilities, you need the $20/mo Plus plan or the $100/mo Pro plan to get professional-grade rate limits.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Kimi Membership: Swarms &amp;amp; Visual Coding&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Moonshot AI's &lt;strong&gt;Kimi&lt;/strong&gt; costs &lt;strong&gt;$19/month&lt;/strong&gt; (reduced to $15/mo if billed annually). It is powered by Kimi K2.6.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Visual Coding:&lt;/strong&gt; Specialized in turning prompts into full-stack working websites, interactive elements, or styled presentations.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Agent Swarms:&lt;/strong&gt; Built to run massive parallel processing tasks.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The Verdict:&lt;/strong&gt; Kimi is excellent if your work involves front-end prototyping, rapid visual iteration, or data extraction. For pure systems programming or backend work, OpenCode or Kilo are better fits.&lt;/p&gt;




&lt;h2&gt;
  
  
  4. MiniMax Token Plan: Built for Agent Loops
&lt;/h2&gt;

&lt;p&gt;MiniMax offers tiered plans designed around running parallel agent loops using their flagship &lt;strong&gt;MiniMax-M3&lt;/strong&gt; model:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Plus ($20/mo):&lt;/strong&gt; Limits you to 3–4 concurrent agents. Best for personal projects.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Max ($50/mo):&lt;/strong&gt; Supports 4–5 concurrent agents. Designed for daily coding.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Ultra ($120/mo):&lt;/strong&gt; Supports 6–7 concurrent agents. Designed for complex, multi-agent orchestrations.&lt;/li&gt;
&lt;li&gt;  &lt;em&gt;Alternative:&lt;/em&gt; You can buy credit packages starting at $5 (5,000 credits) to pay purely on consumption.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The Verdict:&lt;/strong&gt; If you are building applications that require multiple agents talking to each other in parallel, the MiniMax Ultra tier is built specifically to handle that concurrency. For standard single-agent coding, it is overpriced.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Verdict: Which Plan Should You Buy?
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;If you are on a budget:&lt;/strong&gt; Get &lt;strong&gt;OpenCode Go&lt;/strong&gt; for $10/month. The combination of DeepSeek V4, Qwen3.7 Max, and Kimi K2.7 Code under generous 5-hour rolling windows is the best price-to-performance deal on the market.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;If you want model freedom and zero markup:&lt;/strong&gt; Go with &lt;strong&gt;Kilo (BYOK)&lt;/strong&gt;. If you spend more than $19/mo, sign up for &lt;strong&gt;Kilo Pass&lt;/strong&gt; to get up to 50% extra value in free credits.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;If you want hands-off, async coding:&lt;/strong&gt; Get &lt;strong&gt;Mistral Vibe Pro&lt;/strong&gt; for $14.99/month. The ability to teleport long-running tasks to the cloud sandbox is a massive productivity booster.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;If you are in an enterprise team:&lt;/strong&gt; Choose &lt;strong&gt;GitHub Copilot Business/Enterprise&lt;/strong&gt; for its pooled credit system and tight integration with GitHub repositories.&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>ai</category>
      <category>programming</category>
      <category>productivity</category>
      <category>softwareengineering</category>
    </item>
    <item>
      <title>Stop Letting Your AI Agent Write Garbage: 5 Skills You Need Installed Right Now</title>
      <dc:creator>youxufkhan</dc:creator>
      <pubDate>Fri, 26 Jun 2026 22:30:21 +0000</pubDate>
      <link>https://dev.to/youxufkhan/stop-letting-your-ai-agent-write-garbage-5-skills-you-need-installed-right-now-1lp8</link>
      <guid>https://dev.to/youxufkhan/stop-letting-your-ai-agent-write-garbage-5-skills-you-need-installed-right-now-1lp8</guid>
      <description>&lt;p&gt;If you use AI coding agents like Claude Code, Cursor, Opencode, Antigravity or Gemini out of the box, you've probably noticed a pattern. Sometimes they write brilliant code. Other times, they dive headfirst into a problem, make wild assumptions, and spit out 500 lines of bloated, over-engineered spaghetti code that takes hours to untangle.&lt;/p&gt;

&lt;p&gt;AI agents are incredibly powerful, but they lack discipline, taste, and a structured methodology. They act like enthusiastic junior developers who just drank three energy drinks.&lt;/p&gt;

&lt;p&gt;To fix this, you need &lt;strong&gt;agent skills&lt;/strong&gt; composable instructions, workflows, and guardrails that fundamentally change how your AI behaves.&lt;/p&gt;

&lt;p&gt;Here are five must-have agent skills you should install to turn your chaotic AI assistant into a disciplined, specialized engineering team.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Superpowers
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Repository:&lt;/strong&gt; &lt;a href="https://github.com/obra/superpowers" rel="noopener noreferrer"&gt;obra/superpowers&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What it does:&lt;/strong&gt; Superpowers acts as a complete software development methodology for your agent. Instead of jumping straight to writing code, it forces the AI to step back, interview you about what you actually want, and write a digestible spec. Once you approve the spec, it generates an implementation plan (emphasizing Test-Driven Development) and spins up sub-agents to work through the tasks autonomously.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why it's a must-have:&lt;/strong&gt; Without a system, AI agents get lost in the weeds of large projects. Superpowers brings order to the chaos. You need this because it stops the AI from guessing your intent and ensures it stays on track, even during long sessions of autonomous coding.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Agency Agents
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Repository:&lt;/strong&gt; &lt;a href="https://github.com/msitarzewski/agency-agents" rel="noopener noreferrer"&gt;msitarzewski/agency-agents&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What it does:&lt;/strong&gt; Instead of relying on a single, generic AI assistant, Agency Agents provides a roster of highly specialized, personality-driven AI "employees." Whether you need a Frontend Developer focused on Core Web Vitals, an Incident Response Commander, or a technical SEO Specialist, this repo gives you access to battle-tested workflows for specific roles.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why it's a must-have:&lt;/strong&gt; General-purpose prompts yield generic results. By loading a specific agent from the Agency, you force the AI to adopt the deep expertise and distinct deliverables of a senior specialist in that exact field. Use this when you need domain-specific expertise rather than a generic coding assistant.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Karpathy-Inspired Skills
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Repository:&lt;/strong&gt; &lt;a href="https://github.com/multica-ai/andrej-karpathy-skills" rel="noopener noreferrer"&gt;multica-ai/andrej-karpathy-skills&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What it does:&lt;/strong&gt; Derived from AI researcher Andrej Karpathy's observations on LLM coding pitfalls, this skill enforces four strict principles: Think Before Coding, Simplicity First, Surgical Changes, and Goal-Driven Execution. It requires the AI to explicitly state assumptions, write the absolute minimum required code, and clean up its own mess without touching unrelated files.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why it's a must-have:&lt;/strong&gt; AI models notoriously love to overcomplicate abstractions and silently change code they don't understand. You must install this to act as a strict tech lead that slaps the AI on the wrist whenever it tries to over-engineer a simple 50-line fix into a 1,000-line disaster.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Addy Osmani's Agent Skills
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Repository:&lt;/strong&gt; &lt;a href="https://github.com/addyosmani/agent-skills" rel="noopener noreferrer"&gt;addyosmani/agent-skills&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What it does:&lt;/strong&gt; Built by Chrome engineering leader Addy Osmani, this is a suite of production-grade engineering workflows triggered by simple slash commands (like &lt;code&gt;/spec&lt;/code&gt;, &lt;code&gt;/plan&lt;/code&gt;, &lt;code&gt;/build&lt;/code&gt;, &lt;code&gt;/test&lt;/code&gt;). It encodes the quality gates and best practices that senior engineers use, forcing the AI to validate its work incrementally rather than doing it all in one giant, unverified pass.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why it's a must-have:&lt;/strong&gt; If you want enterprise-grade code quality, you need this. It ensures your agent doesn't skip testing or code review. You should use this to bring structured, predictable lifecycle management to every feature you build with AI.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Taste Skill
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Repository:&lt;/strong&gt; &lt;a href="https://github.com/Leonxlnx/taste-skill" rel="noopener noreferrer"&gt;Leonxlnx/taste-skill&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What it does:&lt;/strong&gt; Billed as the "Anti-Slop Frontend Framework," this skill upgrades the visual output of AI-built interfaces. Instead of the default boilerplate UI that looks like a generic dashboard from 2018, Taste Skill forces the agent to use premium layout patterns, strong typography, appropriate motion, and proper spacing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why it's a must-have:&lt;/strong&gt; AI defaults to mediocre design. If you're building user-facing applications, installing Taste Skill is the difference between an app that looks like a cheap prototype and one that feels like a premium, thoughtfully crafted product. Use this to instantly elevate your frontend code without needing to constantly micromanage CSS padding and font weights.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Bottom Line
&lt;/h2&gt;

&lt;p&gt;You wouldn't let a junior engineer commit straight to production without a spec, a plan, or a code review. Stop letting your AI do it. By installing these skills, you provide the guardrails necessary to get consistent, high-quality output. Install them, set your standards, and let the agents do the heavy lifting.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>programming</category>
      <category>productivity</category>
      <category>tooling</category>
    </item>
    <item>
      <title>Free AI Coding CLI Tools in 2026: A Practical Guide</title>
      <dc:creator>youxufkhan</dc:creator>
      <pubDate>Sat, 18 Apr 2026 15:56:52 +0000</pubDate>
      <link>https://dev.to/youxufkhan/free-ai-coding-cli-tools-in-2026-a-practical-guide-48ig</link>
      <guid>https://dev.to/youxufkhan/free-ai-coding-cli-tools-in-2026-a-practical-guide-48ig</guid>
      <description>&lt;p&gt;AI coding assistants have become essential in modern development workflows. But with the big players pivoting to paid models, finding a free or affordable option is getting harder. Here's what actually works and how to set it up in minutes.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem with Major AI Coding Tools
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://claude.com/code" rel="noopener noreferrer"&gt;Claude Code&lt;/a&gt;&lt;/strong&gt; remains the gold standard for CLI-based AI coding. It's powerful, well-integrated, and handles complex codebases beautifully. But the pay-as-you-go pricing adds up fast. If you're using it heavily throughout the day, the costs can surprise you.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://gemini.google.com" rel="noopener noreferrer"&gt;Google Gemini&lt;/a&gt;&lt;/strong&gt; initially offered a generous free tier with their top models (Gemini 2.5 and 2.5 Pro). But recent quota changes have made free access significantly more restrictive. The writing is on the wall free tiers rarely survive.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://qwen.ai" rel="noopener noreferrer"&gt;Qwen&lt;/a&gt;&lt;/strong&gt; (Alibaba's Qwen 2.5 Coder) offered a compelling free alternative through their CLI, but they ended their free tier just last week. If you were counting on it, too bad.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://openai.com/codex" rel="noopener noreferrer"&gt;OpenAI's Codex&lt;/a&gt;&lt;/strong&gt; is currently free but as the saying goes, "free until it isn't." The tier exists, but how long it lasts is anyone's guess.&lt;/p&gt;




&lt;h2&gt;
  
  
  Free and Open Source Alternatives That Actually Work
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Opencode CLI
&lt;/h3&gt;

&lt;p&gt;My personal favorite. Opencode offers &lt;strong&gt;free models through Opencode Zen&lt;/strong&gt; with surprisingly generous limits. The tool itself is open-source and you can use it for free, or upgrade to paid plans ($5-20/month) for higher limits and more models.&lt;/p&gt;

&lt;p&gt;What sets Opencode apart:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Built-in skills system for specialized tasks&lt;/li&gt;
&lt;li&gt;Active plugin ecosystem&lt;/li&gt;
&lt;li&gt;Great documentation&lt;/li&gt;
&lt;li&gt;Runs locally with your choice of models&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Kilo CLI
&lt;/h3&gt;

&lt;p&gt;Another solid open-source option. Kilo routes through their gateway and includes built-in agents: Plan, Build, Debug, and Orchestrator. They offer decent free models without requiring a paid subscription.&lt;/p&gt;




&lt;h2&gt;
  
  
  Supercharge Opencode with Plugins
&lt;/h2&gt;

&lt;p&gt;One of Opencode's strengths is its plugin ecosystem. Here are three plugins worth adding:&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://github.com/code-yeongyu/oh-my-openagent" rel="noopener noreferrer"&gt;oh-my-openagent&lt;/a&gt; (52.5k ⭐)
&lt;/h3&gt;

&lt;p&gt;Previously called "oh-my-opencode", this is a beast. It gives you a full AI dev team:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Sisyphus&lt;/strong&gt; - Main orchestrator that plans, delegates to specialists, and drives tasks to completion&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hephaestus&lt;/strong&gt; - Autonomous deep worker for end-to-end execution&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Prometheus&lt;/strong&gt; - Strategic planner that interviews you before touching code&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Features include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;ultrawork&lt;/code&gt; command - one word, all agents activate and don't stop until done&lt;/li&gt;
&lt;li&gt;Hash-anchored edits - prevents stale-line errors&lt;/li&gt;
&lt;li&gt;Built-in MCPs (web search, official docs, GitHub search)&lt;/li&gt;
&lt;li&gt;Ralph Loop - self-referential loop that keeps working until 100% done&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://github.com/obra/superpowers" rel="noopener noreferrer"&gt;Superpowers&lt;/a&gt; (159k ⭐)
&lt;/h3&gt;

&lt;p&gt;A complete software development methodology. The workflow:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;brainstorming&lt;/strong&gt; - Refines your idea before writing code&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;using-git-worktrees&lt;/strong&gt; - Creates isolated workspace on new branch&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;writing-plans&lt;/strong&gt; - Breaks work into 2-5 minute tasks&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;subagent-driven-development&lt;/strong&gt; - Dispatches agents per task with two-stage review&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;test-driven-development&lt;/strong&gt; - Enforces RED-GREEN-REFACTOR&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;requesting-code-review&lt;/strong&gt; - Reviews before continuing&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;finishing-a-development-branch&lt;/strong&gt; - Verifies tests, presents merge options&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Skills include systematic-debugging, verification-before-completion, and writing-skills.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://github.com/msitarzewski/agency-agents" rel="noopener noreferrer"&gt;Agency&lt;/a&gt; (82k ⭐)
&lt;/h3&gt;

&lt;p&gt;50+ specialized agents across different divisions:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Engineering&lt;/strong&gt;: Frontend Developer, Backend Architect, AI Engineer, DevOps, Security Engineer, SRE, Database Optimizer, Technical Writer&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Design&lt;/strong&gt;: UI Designer, UX Researcher, Brand Guardian, Whimsy Injector, Visual Storyteller&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Marketing&lt;/strong&gt;: Growth Hacker, Content Creator, SEO Specialist, Twitter Engager, TikTok Strategist&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Sales&lt;/strong&gt;: Outbound Strategist, Deal Strategist, Sales Engineer, Pipeline Analyst&lt;/p&gt;

&lt;p&gt;Each agent has personality, processes, and measurable deliverables.&lt;/p&gt;




&lt;h2&gt;
  
  
  My Solution: One-Command Setup
&lt;/h2&gt;

&lt;p&gt;I got tired of manually configuring Opencode with the plugins and free models I wanted. So I built &lt;strong&gt;my-opencode-config&lt;/strong&gt; a tool that sets up everything in one command:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Installs Opencode with OhMyOpenagent&lt;/li&gt;
&lt;li&gt;Pre-configures Superpowers and Agency agents&lt;/li&gt;
&lt;li&gt;Sets up Gemini free models via OAuth&lt;/li&gt;
&lt;li&gt;Configures Opencode Zen free models&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Installation
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx my-opencode-config
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or check out the &lt;a href="https://github.com/youxufkhan/my-opencode-config" rel="noopener noreferrer"&gt;GitHub repo&lt;/a&gt; for more options.&lt;/p&gt;

&lt;p&gt;That's it. One command and you have a fully configured AI coding CLI with free models and premium plugins.&lt;/p&gt;




&lt;h2&gt;
  
  
  What I Use Daily
&lt;/h2&gt;

&lt;p&gt;For my daily coding:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Opencode&lt;/strong&gt; as my primary CLI (configured via my-opencode-config)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Kilo&lt;/strong&gt; as backup when I need different model quirks&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Claude Code&lt;/strong&gt; for specific tasks where it shines&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  The Takeaway
&lt;/h2&gt;

&lt;p&gt;The landscape shifts fast. Free tiers come and go. But the tools above work today and my setup script gives you a running start without the configuration headaches.&lt;/p&gt;

&lt;p&gt;What are you using for AI-assisted coding? Drop your favorites in the comments.&lt;/p&gt;




</description>
      <category>ai</category>
      <category>programming</category>
      <category>productivity</category>
      <category>coding</category>
    </item>
    <item>
      <title>Getting Started with TypeScript: Type Annotations &amp; Type Inference (Part I)</title>
      <dc:creator>youxufkhan</dc:creator>
      <pubDate>Mon, 08 Jul 2024 15:43:10 +0000</pubDate>
      <link>https://dev.to/youxufkhan/getting-started-with-typescript-type-annotations-type-inference-part-i-2mgg</link>
      <guid>https://dev.to/youxufkhan/getting-started-with-typescript-type-annotations-type-inference-part-i-2mgg</guid>
      <description>&lt;p&gt;Type annotations and type inference are two different systems in typescript but in this post we will talk about them in parallel. &lt;/p&gt;

&lt;h2&gt;
  
  
  Type Annotations
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Code we add to tell TypeScript what type of value a variable will refer to&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;We tell typescript the type&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Type Inference
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Typescript tries to figure out what type of value a variable refers to&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Typescript guesses the type&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;The type annotation system is kind of at odds with the type inference, so we are going to first understand type annotations and then come along and understand how type inference comes into play.&lt;/p&gt;

&lt;p&gt;To make things a little bit more complicated, know that these two different features apply slightly differently to&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Variables&lt;/li&gt;
&lt;li&gt;Functions&lt;/li&gt;
&lt;li&gt;Objects&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Let's first talk about how they are applied to Variables, By Examples&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;apples&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this simple example &lt;strong&gt;:number&lt;/strong&gt; is type annotation.&lt;/p&gt;

&lt;p&gt;If we were to set the value of apples to a boolean we would get an error in  this case.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;apples&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;Error: Type 'boolean' is not assignable to type 'number'.ts(2322)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fumdgh57fvdwnjbj33ntr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fumdgh57fvdwnjbj33ntr.png" alt="Image description" width="602" height="218"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Similarly,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;apples&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;apples&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;asdas
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;Type 'string' is not assignable to type 'number'.ts(2322)&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq617r9iwg7brxjwnvu6i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq617r9iwg7brxjwnvu6i.png" alt="Image description" width="513" height="140"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;banana&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// type inference&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;banana&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt; &lt;span class="c1"&gt;// type annotation&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;banana&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt; &lt;span class="c1"&gt;// type annotation&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the declaration and initialization are on the same line without type annotation, typescript will figure out the type of variable for us&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[Variable declaration]      [Variable initialization]
     const        color   =               red
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Objects:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;//Type inference&lt;/span&gt;
 &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;point&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
     &lt;span class="na"&gt;x&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
     &lt;span class="na"&gt;y&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;20&lt;/span&gt;
 &lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// Type annotation&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;point&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;x&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;y&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;x&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;y&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Functions:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;//Type inference&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;logNumber&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// Type annotation&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;logNumber&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="c1"&gt;// [(i: number) =&amp;gt; void] is the annotation here&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When to use annotations with functions&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Function that returns 'any' type
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;json&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;{"x": 10, "y": 20}&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;coordinates&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;json&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;coordinates&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// {x:10, y:20}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We need to understand how JSON.parse works for different values&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Passed Value&lt;/th&gt;
&lt;th&gt;JSON.parse()&lt;/th&gt;
&lt;th&gt;Return Value&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;'false'&lt;/td&gt;
&lt;td&gt;JSON.parse()&lt;/td&gt;
&lt;td&gt;boolean&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;'4'&lt;/td&gt;
&lt;td&gt;JSON.parse()&lt;/td&gt;
&lt;td&gt;number&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;'{"value:5"}'&lt;/td&gt;
&lt;td&gt;JSON.parse()&lt;/td&gt;
&lt;td&gt;{value:name}&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;'{"name":"alex"}'&lt;/td&gt;
&lt;td&gt;JSON.parse()&lt;/td&gt;
&lt;td&gt;{name:string}&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;em&gt;Typscript decides to set return type to any, meaning it has no idea what type will be returned.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Why and when to use type annotation or type inference
&lt;/h2&gt;

&lt;h4&gt;
  
  
  Type inference
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;When we declare a variable on one line then initialize it later&lt;/li&gt;
&lt;li&gt;When we want a variable to have a type that cant be inferred&lt;/li&gt;
&lt;li&gt;When a function returns the 'any' type and we need to clarify the value&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Type inference
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Always&lt;/li&gt;
&lt;li&gt;When we  declare a variable on one line and initialize it later&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Lets wrap the first part of type annotations and type inference in typescript. We will discuss it further in next post. 💯&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Getting Started with TypeScript: Types</title>
      <dc:creator>youxufkhan</dc:creator>
      <pubDate>Sun, 12 May 2024 19:57:20 +0000</pubDate>
      <link>https://dev.to/youxufkhan/getting-started-with-typescript-types-4ono</link>
      <guid>https://dev.to/youxufkhan/getting-started-with-typescript-types-4ono</guid>
      <description>&lt;h2&gt;
  
  
  Type
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What is Type?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Easy way to refer to different properties + functions that a value has&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Let's learn from an example&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;"red"&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;What do you see above, it's a string. That's right. But also&lt;br&gt;
It is a value that has all the properties + methods that we assume that a string has &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Properties + Methods a 'string' has in JS&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;charAt(), charCodeAt(), concat(), includes(), endsWith(), indexOf(), lastlndexOf(), localeCompare(), match(), length and so on....&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I hope you understand from the above example what a type is.&lt;/p&gt;

&lt;h2&gt;
  
  
  Categories of Types
&lt;/h2&gt;

&lt;p&gt;In the world of typescript there are two different categories of types.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Primitive Types&lt;/li&gt;
&lt;li&gt;Object Types&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Primitive Types
&lt;/h2&gt;

&lt;p&gt;Primitive types are all the basic types you might guess.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;number&lt;/li&gt;
&lt;li&gt;string&lt;/li&gt;
&lt;li&gt;boolean&lt;/li&gt;
&lt;li&gt;symbol&lt;/li&gt;
&lt;li&gt;void&lt;/li&gt;
&lt;li&gt;null&lt;/li&gt;
&lt;li&gt;undefined&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Object Types
&lt;/h2&gt;

&lt;p&gt;These are any types you create or any other types that are built into language itself.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;functions&lt;/li&gt;
&lt;li&gt;classes&lt;/li&gt;
&lt;li&gt;arrays &lt;/li&gt;
&lt;li&gt;Objects&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Why do we care about types?&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Types are used by the Typescript Compiler to analyze our code for errors&lt;/li&gt;
&lt;li&gt;Types allow other engineers to understand what values are flowing around our codebase&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Examples of Types&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;today&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;I created a variable that is an instance of a Date object, if I hover of that variable my code editor will tell me the type of value this variable is pointing at.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;const today: Date&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Typescript can now use this information to decide what we can do with this variable. For example if we use this variable and put a dot at the end, I will see my autocomplete pop up here.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcuz8tug0qhl3niw75hkw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcuz8tug0qhl3niw75hkw.png" alt="Typescript"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is listing out all the different functions and properties a Date object has. Typescript knows that because it has internal definition of what a Date is.&lt;/p&gt;

&lt;p&gt;Similarly if we try to reference a value that a doesn't exist in the Date object, we will immediately see an error.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffnwpm0xunu1oskhitb3v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffnwpm0xunu1oskhitb3v.png" alt="Typescript"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now lets create a plain JavaScript Object.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;person&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;age&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;getAge&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;age&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;If I hover over the variable now, it will show all the properties and the method the object has.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4z4bbessekg6uwfh5bsg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4z4bbessekg6uwfh5bsg.png" alt="Typescript"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I hope by these examples you have the basic idea of types in TypeScript. We will discuss more about each of these in the later posts.&lt;/p&gt;

</description>
      <category>typescript</category>
      <category>learning</category>
      <category>javascript</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Getting Started with TypeScript: A Quick Introduction From JavaScript to TypeScript!</title>
      <dc:creator>youxufkhan</dc:creator>
      <pubDate>Thu, 02 May 2024 17:29:08 +0000</pubDate>
      <link>https://dev.to/youxufkhan/getting-started-with-typescript-a-quick-introduction-from-javascript-to-typescript-d4f</link>
      <guid>https://dev.to/youxufkhan/getting-started-with-typescript-a-quick-introduction-from-javascript-to-typescript-d4f</guid>
      <description>&lt;p&gt;As I dive into mastering TypeScript this month, I'll be sharing my journey here, keeping it concise and easy to follow. So, let's kick things off with the very basics. I'm assuming you have a basic grasp of JavaScript.&lt;/p&gt;

&lt;p&gt;Here's a short JavaScript snippet to start with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;axios&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;axios&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;url&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;https://jsonplaceholder.typicode.com/todos/1&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;

&lt;span class="nx"&gt;axios&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;then&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;todo&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;ID&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;todo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;title&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;todo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;title&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;completed&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;todo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;completed&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`
        The todo with ID: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;ID&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;
        has a title of: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;title&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;
        is it finished?: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;completed&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;
    `&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;  
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Simple, right? This code just sends an HTTP request using axios and fetches a single todo object from the &lt;a href="https://jsonplaceholder.typicode.com/"&gt;jsonplaceholder&lt;/a&gt; API.&lt;/p&gt;

&lt;p&gt;Now, let's rewrite this in basic TypeScript. First, we can use ES6 module syntax to import axios:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;axios&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;axios&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next, we'll define a type for the url variable:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="kr"&gt;string&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;https://jsonplaceholder.typicode.com/todos/1&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, onto the main part of our code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="nx"&gt;axios&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;then&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;todo&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nx"&gt;Todo&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;ID&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;todo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;title&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;todo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;title&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;completed&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;todo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;completed&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`
        The todo with ID: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;ID&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;
        has a title of: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;title&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;
        is it finished?: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;completed&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;
    `&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;  
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Notice in the above snippet, we've assigned the response data to the todo variable but as Todo. You might be wondering, what's Todo? Well, here's where interfaces come into play. We'll explicitly define a Todo interface:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kr"&gt;interface&lt;/span&gt; &lt;span class="nx"&gt;Todo&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;completed&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;Boolean&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And that's it! Here's how it all looks finally in TypeScript.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;axios&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;axios&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="kr"&gt;string&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;https://jsonplaceholder.typicode.com/todos/1&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;

&lt;span class="kr"&gt;interface&lt;/span&gt; &lt;span class="nx"&gt;Todo&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;completed&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;Boolean&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nx"&gt;axios&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;then&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;todo&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nx"&gt;Todo&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;ID&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;todo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;title&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;todo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;title&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;completed&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;todo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;completed&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`
        The todo with ID: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;ID&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;
        has a title of: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;title&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;
        is it finished?: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;completed&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;
    `&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Before we wrap up, let's quickly highlight the core differences we introduced in the TypeScript version of our code. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Type Annotations&lt;/strong&gt;: We added type annotations to variables, enhancing code clarity and catching potential errors early.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Interface Definition&lt;/strong&gt;: Introducing the Todo interface allowed us to specify the structure of our data, promoting better code organization and type safety.&lt;/p&gt;

&lt;p&gt;In this post, I started with a simple JavaScript snippet fetching data from an API using axios. Then, we gradually migrated it to TypeScript, introducing some of the basic syntax of TypeScript.&lt;/p&gt;

&lt;p&gt;Don't worry if you don't understand some of the terminologies or concepts used here; this is just a short introduction post. In the next post, we'll dive into basic concepts and terminologies to ensure everyone's on the same page. Stay tuned for more TypeScript adventures!&lt;/p&gt;

</description>
      <category>typescript</category>
      <category>javascript</category>
      <category>learning</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
