<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by bibaswan on Medium]]></title>
        <description><![CDATA[Stories by bibaswan on Medium]]></description>
        <link>https://medium.com/@bibaswan7?source=rss-d1d689d21cbf------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*KYhaapfrQUZyig5A</url>
            <title>Stories by bibaswan on Medium</title>
            <link>https://medium.com/@bibaswan7?source=rss-d1d689d21cbf------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 11:09:32 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@bibaswan7/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[TypeScript-Go: The High-Speed Upgrade You Didn’t Know You Needed]]></title>
            <link>https://medium.com/@bibaswan7/typescript-go-the-high-speed-upgrade-you-didnt-know-you-needed-cba1c246552b?source=rss-d1d689d21cbf------2</link>
            <guid isPermaLink="false">https://medium.com/p/cba1c246552b</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[development]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[golang]]></category>
            <dc:creator><![CDATA[bibaswan]]></dc:creator>
            <pubDate>Sun, 16 Mar 2025 03:51:16 GMT</pubDate>
            <atom:updated>2025-03-16T03:51:16.201Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/686/0*wQlqLDelomBD4-pK" /><figcaption>Credit: <a href="https://www.youtube.com/@gamefromscratch">gamefromscratch</a> (<a href="https://www.youtube.com/@gamefromscratch">https://www.youtube.com/@gamefromscratch</a>)</figcaption></figure><p>If you’ve ever worked with TypeScript — the wildly popular tool that adds static typing to JavaScript — you’ve probably loved its ability to catch errors early and make codebases more reliable. But if you’ve tackled a massive project, you might’ve noticed a downside: it can get slow. Really slow. Build times drag, editors lag, and suddenly, that slick developer experience feels clunky.</p><p>Enter <strong>TypeScript-Go</strong>, Microsoft’s ambitious plan to turbocharge TypeScript by rewriting it in the Go programming language. This isn’t just a tweak — it’s a complete overhaul designed to make TypeScript faster, leaner, and ready for the future. Let’s break down what TypeScript-Go is, why it matters, and how it’ll change the way you code.</p><h3>What Is TypeScript-Go?</h3><p>Imagine TypeScript as a trusty car. It’s been running on a JavaScript engine (Node.js) for years, getting you from point A to point B with handy features like type safety. But as your projects grow — like stuffing that car with more passengers and cargo — it starts to chug.</p><p>TypeScript-Go is like swapping out that old engine for a shiny new one made with Go, a language built for speed and efficiency. Instead of running TypeScript’s compiler (called tsc) through JavaScript, Microsoft is porting it to Go, a language that compiles directly to machine code. The result? Builds that finish in a flash and editors that respond instantly, even in huge codebases.</p><p>This project, codenamed “Corsa,” isn’t about changing how you write TypeScript code — it’s about making the behind-the-scenes machinery faster. You keep writing .ts files as usual, but the tools processing them get a massive upgrade.</p><h3>Why Go? Why Not Stick with JavaScript?</h3><p>You might wonder: why mess with something that’s already working? The answer lies in performance.</p><p>The original TypeScript compiler was written in TypeScript itself (which turns into JavaScript). That’s elegant — eating its own dog food — but JavaScript has limits. It’s single-threaded, meaning it can’t easily use all your computer’s cores. Plus, it’s not great at managing memory for giant projects, leading to sluggish builds and bloated resource use.</p><p>Go, created by Google, is a different beast:</p><ul><li><strong>Blazing Fast</strong>: Go compiles to native code, skipping the middleman of a JavaScript engine. Early tests show TypeScript-Go slashing build times by up to 10x.</li><li><strong>Multi-Core Power</strong>: With Go’s “goroutines,” it can juggle tasks across your CPU’s cores, perfect for heavy lifting like type-checking a million-line codebase.</li><li><strong>Memory Smarts</strong>: Go gives developers tight control over memory, cutting down on waste compared to JavaScript’s looser approach.</li></ul><p>Microsoft could’ve picked Rust (super fast, super safe) or another language, but Go’s simplicity and built-in garbage collection made it a natural fit for TypeScript’s needs. It’s less about reinventing the wheel and more about giving it a nitro boost.</p><h3>What’s in It for You?</h3><p>Here’s the exciting part: TypeScript-Go promises to make your life as a developer smoother without forcing you to change a single line of code. Here’s how:</p><ol><li><strong>Lightning-Fast Builds</strong><br> Compiling TypeScript to JavaScript will feel snappier. Whether you’re running a local build or a CI pipeline, those long waits could shrink from minutes to seconds.</li><li><strong>Silky-Smooth Editors</strong><br> Ever typed in VS Code and waited for autocomplete to catch up? TypeScript-Go could make features like error checking and “go to definition” near-instant, even in sprawling projects.</li><li><strong>Scalability for Big Teams</strong><br> If you’re on a team managing a massive app — think hundreds of files and millions of lines — TypeScript-Go will keep things humming where the old system bogged down.</li></ol><p>The best part? You don’t need to learn Go or rewrite your code. It’s a drop-in replacement for the current compiler.</p><h3>Where Is TypeScript-Go Right Now?</h3><p>As of March 15, 2025, TypeScript-Go is still in the works. Microsoft is building it in the open on <a href="https://github.com/microsoft/typescript-go">GitHub</a>, and it’s shaping up fast. They’ve already ported key pieces like the parser and type checker, matching the latest TypeScript 5.8 features. The goal? A full release as <strong>TypeScript 7.0</strong> by late 2025.</p><p>For now, the current JavaScript-based TypeScript (the 6.x series) will keep evolving, so there’s no rush to switch. When TypeScript-Go lands, it’ll merge into the main TypeScript project, making the transition seamless.</p><h3>Why Should You Care?</h3><p>TypeScript has become a cornerstone of modern web development, powering everything from small startups to giants like Airbnb and Slack. But as its popularity soared, so did the demands on its performance. TypeScript-Go isn’t just a nerdy experiment — it’s a response to real-world needs.</p><p>If you’ve ever groaned at a slow build or cursed a lagging IDE, this is for you. It’s about keeping TypeScript’s magic alive as projects get bigger and more complex. And since it’s open-source, you can peek under the hood or even pitch in.</p><h3>The Bottom Line</h3><p>TypeScript-Go is Microsoft’s big bet to make TypeScript faster and future-proof. By swapping JavaScript for Go, they’re tackling the pain points of slow builds and editor lag without changing what developers love about TypeScript. It’s still cooking, but when it lands, expect a serious upgrade to your workflow.</p><p>So, next time you’re waiting on a tsc command, just imagine: a Go-powered TypeScript is on the way, ready to speed things up. Keep an eye on it — this could be the boost TypeScript needs to stay king of the JavaScript hill.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cba1c246552b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Adding Custom Fonts for“pdfMake” Library]]></title>
            <link>https://medium.com/@bibaswan7/adding-custom-fonts-for-pdfmake-library-37bb7614ac38?source=rss-d1d689d21cbf------2</link>
            <guid isPermaLink="false">https://medium.com/p/37bb7614ac38</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[tutorial]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[problem-solving]]></category>
            <category><![CDATA[pdf]]></category>
            <dc:creator><![CDATA[bibaswan]]></dc:creator>
            <pubDate>Thu, 12 Dec 2024 15:14:58 GMT</pubDate>
            <atom:updated>2024-12-12T15:15:28.529Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lUhiJOAovltkkOhQiMbSBw.png" /></figure><p>In this blog, I am going to show how to easily integrate custom fonts into <a href="https://www.npmjs.com/package/pdfmake">pdfMake</a> -a popular npm package that generates PDFs in JavaScript. Follow this step-by-step guide to learn the entire process.</p><p><strong>1. Navigate to the Package Directory</strong><br> Go to the package directory <strong>./node_modules/pdfmake/</strong>. While it might feel unusual to explore the node_modules directory, this step is necessary for adding custom fonts.</p><p><strong>2. Create a Fonts Subdirectory</strong><br> Create a subdirectory named <strong>examples/fonts</strong> in your pdfMake code directory if it doesn’t already exist. You can name the folder anything you like; the name doesn’t affect the process.</p><p><strong>3. Copy Font Files</strong><br> Copy your custom font files into the newly created folder. For example, if you created the <strong>examples/fonts</strong> subdirectory, paste the font files into the <strong>fonts</strong> folder.</p><p><strong>4. Build the Virtual File System (VFS)</strong><br> Navigate back to the main <strong>pdfMake</strong> directory inside <strong>node_modules</strong> and run the following command in your terminal:</p><pre>node build-vfs.js ./examples/fonts</pre><p>Or, specify the location of your font files:</p><pre>node build-vfs.js [location of font files]</pre><p>This command builds the font files and adds them to the <strong>vfs_fonts.js</strong> file located in the <strong>build</strong> folder.</p><p><strong>5. Copy the VFS File</strong><br> Copy the generated <strong>vfs_fonts.js</strong> file to your project’s <strong>assets </strong>folder or any directory of your choice.</p><p><strong>6. Edit the VFS File</strong><br> Open the vfs_fonts.js file and remove all unnecessary code, leaving only the following:</p><pre>const vfs = { … }; // The font object<br>export { vfs };</pre><p><strong>7. Import the VFS File in Your Project</strong><br> In the file where you are using <strong>pdfMake</strong>, import the <strong>vfs_fonts.js</strong> file from your assets folder:</p><pre>import pdfMake from &quot;pdfmake/build/pdfmake&quot;;<br>import { vfs as vfsFonts } from &quot;@/assets/…/vfs_fonts&quot;;<br>pdfMake.vfs = vfsFonts;<br>pdfMake.fonts = {<br>    Poppins: {<br>        normal: &quot;Poppins-Regular.ttf&quot;, // Use the exact names of the font files or keys in the `vfs` object<br>        bold: &quot;Poppins-SemiBold.ttf&quot;,<br>    },<br>};<br>pdfMake.createPdf({<br>    defaultStyle: {<br>        font: &#39;Poppins&#39;,<br>    },<br>    // Other PDF content here<br>});</pre><p>And that’s it! You’ve successfully added custom fonts to <strong>pdfMake</strong>. Your PDF will now use the specified fonts.</p><p>If there are any issues? Please reach me out.</p><p>— Happy Coding —</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=37bb7614ac38" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>