---
title: "Discussion on \"How to Build and Publish an npm Package with TypeScript\" | Hashnode"
description: "Discussion on \"How to Build and Publish an npm Package with TypeScript\". Learn to build and publish an npm package using TypeScript with step-by-step guidance, including GitHub Actions automation tips"
url: "https://hashnode.com/posts/how-to-build-and-publish-an-npm-package-with-typescript/6740cbbe8f039c97fc6abe6f"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How to Build and Publish an npm Package with TypeScript](https://blog.skoruba.com/how-to-build-and-publish-an-npm-package-with-typescript?utm_source=hashnode&utm_medium=feed)

Learn to build and publish an npm package using TypeScript with step-by-step guidance, including GitHub Actions automation tips

Nov 22, 2024 · 3 min read · blog.skoruba.com  
Updated Nov 24, 2024  
Read the article

-   [#npm](https://hashnode.com/tag/npm)
-   [#typescript](https://hashnode.com/tag/typescript)
-   [#npm-publish](https://hashnode.com/tag/npm-publish)
-   [#npm-packages](https://hashnode.com/tag/npm-packages)

## Written by

[Jan Škoruba](https://hashnode.com/@skoruba)

@skoruba · Prague, Czech Republic

  
[View profile](https://hashnode.com/@skoruba)

Software Developer & Identity Consultant

I am a Software Developer and Identity Consultant, specializing in securing applications and APIs using OpenID Connect and OAuth.

## Responses 1

Markdown supported · ⌘↵ to post

[José Pablo Ramírez Vargas](https://hashnode.com/@webJose)

[Nov 23, 2024](https://hashnode.com/posts/how-to-build-and-publish-an-npm-package-with-typescript/6740cbbe8f039c97fc6abe6f/comment/6741f96a51ad8d1756bb44ee)

It would have been nicer if the package had exported types.

[Jan Škoruba](https://hashnode.com/@skoruba)

[Nov 24, 2024](https://hashnode.com/posts/how-to-build-and-publish-an-npm-package-with-typescript/6740cbbe8f039c97fc6abe6f/comment/6741f96a51ad8d1756bb44ee#reply-67434b9d055dc7c5dc3a40a4)

Hi [José Pablo Ramírez Vargas](https://hashnode.com/@webJose) - it is great suggestion, I will check it and update post. Thank you. 👍🏻 **Edit**: Already updated, thanks!

[José Pablo Ramírez Vargas](https://hashnode.com/@webJose)

[Nov 24, 2024](https://hashnode.com/posts/how-to-build-and-publish-an-npm-package-with-typescript/6740cbbe8f039c97fc6abe6f/comment/6741f96a51ad8d1756bb44ee#reply-674355bd3680bbe4482f3a97)

[Jan Škoruba](https://hashnode.com/@skoruba) great! One last detail. Don't think I'm bothering just for the sake of bothering. In "exports", the types always go first. If you were to run the publint package on your newly created package, you'll see the warning about this and the reason behind it. Other than that, I'd say well done.

[Jan Škoruba](https://hashnode.com/@skoruba)

[Nov 24, 2024](https://hashnode.com/posts/how-to-build-and-publish-an-npm-package-with-typescript/6740cbbe8f039c97fc6abe6f/comment/6741f96a51ad8d1756bb44ee#reply-6743673b2f7f6a91314eec10)

[José Pablo Ramírez Vargas](https://hashnode.com/@webJose) - great tip, I updated it. Thank you for your valuable comments! 👌🏻
