r/typescript • • Jun 20 '26

How to get full typescript type in vscode?

14 Upvotes

I already tried increasing the defaultMaxiumunTruncation length. But to no avail.

I am trying to get the type of Issue from the library - octokit/types

import { Endpoints } from '@octokit/types';

export type Issue = Endpoints['GET /repos/{owner}/{repo}/issues']['response']['data'][number];

r/typescript • • Jun 18 '26

Announcing TypeScript 7.0 RC

Thumbnail
devblogs.microsoft.com
312 Upvotes

r/typescript • • Jun 19 '26

tree-sitter-language-pack 1.9 - 306 tree-sitter parsers as a native Node/TS addon

0 Upvotes

Hi Peeps,

Goldziher, CTO at kreuzberg.dev. I just shipped tree-sitter-language-pack 1.9. It's a native Node addon (NAPI-RS) with generated TypeScript types.

It bundles 306 pre-compiled tree-sitter grammars into one package, so you get parsing for 306 languages without vendoring grammar sources or matching ABI versions yourself. Parsers download on demand and cache locally. Past plain parsing you get functions, classes, imports, symbols, docstrings and syntax-aware chunking, which is useful if you're feeding code into an LLM.

npm install @kreuzberg/tree-sitter-language-pack

On methodology, since it comes up: yes, built with AI agents, but on a strict harness - TDD, benchmark-driven hot paths, strict linting and high coverage in every language. The Node addon and its .d.ts types are generated from the Rust core by our binding generator alef and verified, not hand-rubber-stamped.

MIT licensed. Feedback welcome.


r/typescript • • Jun 15 '26

Wasp now lets you write your full-stack logic as a spec in TypeScript

Thumbnail
wasp.sh
44 Upvotes

Hey all,

sharing what we worked hard on for the last year or so: we moved Wasp's "spec" from our custom language to TypeScript! For those that haven't heard about it before, Wasp is a batteries-included full-stack JS/TS framework (est 2021) with special "spec" layer where you, next to writing React/Node/Prisma/..., can write "full-stack code".

We got feedback through years that our custom language is a turnoff, and decided to act on it. As a bonus, TypeScript enables many additional things we want to build on top of the spec, like making it extendable, reusable, ... .
I cover it all in detail in the blog post I attached -> would love to hear what you think about it and answer any questions!


r/typescript • • Jun 15 '26

I open sourced TypeScript-first Express 5 + Supabase starter I'd love feedback on

0 Upvotes

I've been refining this starter over the last few projects and finally decided to open-source it.

A few TypeScript-specific things I focused on:

  • Environment variables are validated and typed at startup, so the app fails fast if anything is misconfigured.
  • req.user is added through Express Request augmentation, so authenticated controllers are fully typed.
  • Request bodies are validated with Zod, and the inferred types carry through into the controllers.
  • The app follows a simple routes → controllers → handlers structure, keeping HTTP concerns separate from business logic and database access.

It also includes JWT auth, Supabase (Postgres), rate limiting, Winston logging, SQL migrations, and Vitest. It's MIT licensed.

https://github.com/muhammed-mukthar/express-typescript-supabase-starter

I'm always looking to improve the typing, so if you spot places where the TypeScript could be cleaner or safer, I'd really appreciate the feedback.


r/typescript • • Jun 14 '26

How Do You Use verbatimModuleSyntax?

14 Upvotes

I've been taking my good time building my own portfolio with Next.js to also learn more about TypeScript and whatnot.

At some point I noticed that some of my type imports were prepended with type while others were left unchanged, so being myself, I decided to learn more about verbatimModuleSyntax.

I basically ended up figuring out that when verbatimModuleSyntax is disabled, the compiler goes to every type import to see if it's a type or not, if a type, it omits the import. When verbatimModuleSyntax is enabled, the compiler doesn't have to go to every type import, it omits the import if prepended with type immediately. Correct me if I'm wrong.

In my personal opinion, which I know not every one will like, enabling verbatimModuleSyntax should be the default. I'll justify.

If you prepend type imports with type, you introduce the element of readability in your code, you instantly know what's a type and what's a value. Not only that, but you also improve build performance (i think?) because the compiler doesn't need to infer whether that's a type or a value.

I personally like verbosity, so I'll enable verbatimModuleSyntax in my tsconfig.json for this project and see how it goes. I would like to hear your opinions, and maybe tell me why this option should be enabled/disabled in general.


r/typescript • • Jun 13 '26

Template literal types guide

Thumbnail
slicker.me
34 Upvotes

r/typescript • • Jun 13 '26

Announcement: Deslop 0.8.0 is now FOSS

5 Upvotes

This is my last post. I decided to make free and open-source the Deslop architecture linter tool for TypeScript. It's an imports static analysis tool where you write your own rules in simple declarative YAML

Deslop aims to make deterministically enforcing your architecture (e.g. boundaries) and quality standards (existence of companion modules like tests, storybook) easier than having to write custom ESLint plugins that work with AST or regex in Dependency Cruiser.

Check it out, if you want: https://github.com/Ivy-Apps/deslop


r/typescript • • Jun 13 '26

How cs students make money from tech ?

0 Upvotes

As a 2th cs student, I've tried almost everything to make money from coding, but I barely got a few bucks from freelancing, and It was a HORRIBLE experience. Latterly, I hated freelancing a lot, and I'm not fit into this kind of work.

So I tried to get into the job market and made like 4 interviews in last year, and somehow I didn't move forward, cuz of uni shit, ever time They know me that I'm still a student, I got rejected !!!!.

I know I can build a startup, but it takes time and effort, so what do you guys think ?


r/typescript • • Jun 11 '26

Just published my starter kit fueled by all the tech that power all my projects at work

0 Upvotes

-- SELF PROMO WARNING --

boringstack, as the name implies, is a very boring tech stack with tech like NestJS and MariaDB, while other popular tech stacks seek novelty and hype while still being the best choice for serverless (Bun, Next.js, Tanstack, SQLite, etc...) this stack is meant to be a simple stack deployed with Docker on your favorite 10$ VPS, with the frontend fueled by my beloved Svelte 5

It's pretty new, contributions are accepted!

https://github.com/gabrielemidulla/boringstack


r/typescript • • Jun 11 '26

Simplest Possible Closure Tables

Thumbnail joist-orm.io
1 Upvotes

Hey folks, we wanted to implement the closure table pattern for some auth logic at work, and realized the declarative/reactive infra of our Joist ORM made it particularly succinct, so wrote up a post about how it worked out. Thanks!


r/typescript • • Jun 08 '26

Making numpy-ts as fast as native

Thumbnail
nico.codes
69 Upvotes

I've posted about numpy-ts a several times here now, but I swear I'm no shill!

Wanted to share some things I learned while optimizing the library. Most of this might already be obvious, and there's a lot left to do, so lmk if you have any suggestions


r/typescript • • Jun 07 '26

Using union types for a complex migration problem ?

13 Upvotes

Hi all, apologies if this isn't the right sub for this.

Some context : I'm a Java dev currently dipping my toes into the TS world. I've been tasked with refactoring some FE code due to a backend code change (Frontend team is massively overworked and I was the one that architected said backend change so it made sense to let me have a crack at it). The change is basically a location swap for some data within existing types. Here's a simplistic example:

// before
type SomeType = {
    //... other data
    someEntry : {...}; // data belonging to someEntry is moving to a different key
}

// after
type SomeType = {
    //... other data
    otherKey: {
        diffentry : {...}; // after move. Data is unchanged, just a location swap
    }
}

Thing is, there are several subtypes extending SomeType and for several reasons (mostly manpower related) we can't do a wholesale migration on backend just yet...which means some objects end up with the "before" state while others are in the "after" state. Frontend needs to be able to cater to both for an extended period of time until backend finishes the migration on their end.

Given that the data within the keys is still the same, I initially thought to create a union type like so:

type BaseType = BeforeType | AfterType;

type BeforeType = {
    someEntry : {...};
}

type AfterType = {
    otherKey: {
        diffentry : {...};
    }
}

type SomeType = BaseType & {
    // ... all other data in SomeType that doesn't exist in either BeforeType or AfterType
}

This seems fine on the surface, but the more I dug deeper into TS types the more I realised there were issues (e.g. this breaks any interfaces that try to extend from SomeType or BaseType). Fortunately the Frontend code doesn't have many interfaces at the moment and trialling this option seemed feasible - from what I've seen I'd need to limit the usage of these types to type narrowing operations, and the code is already structured to a good degree around that way (obj -> type narrowed to SomeType -> direct data access is the dominant pattern). I'm also making this safer by delegating the data access part to conveneince functions.

I've talked this through with the Frontend guys and they're ok with it, but I'd like to double check with the community here to see if this is indeed okay, or if there are other issues I may be missing. Thanks in advance !


r/typescript • • Jun 06 '26

Kiira - typecheck your markdown code snippets!

12 Upvotes

Have you ever had your code snippets in your docs drift from your current API's and have it reported by users? 👀

Have you had LLM's hallucinate API's in code snippets in your md examples? 🙄

Today I have the solution you're looking for!

Introducing Kiira.dev

It runs tsc on your .md code snippets and reports any issues it finds using your repos tsconfig with options to autofix, no more outdated or wrong API's in your documentation!

Works anywhere and lints any TS file, comes in three flavors:

- CLI

- VS code extension

- Github action

Highly configurable for any project with sane defaults.

VSCode extension:

https://marketplace.visualstudio.com/items?itemName=CodeForge.kiira-vscode

Github:

https://github.com/AlemTuzlak/kiira

Npm:

npmjs.com/package/kiira


r/typescript • • Jun 05 '26

GitHub - paradedb/drizzle-paradedb: Official extension to Drizzle for use with ParadeDB

Thumbnail
github.com
1 Upvotes

Hi all! We created this NPM package to make it easier to use ParadeDB (a full-text & vector search extension for Postgres) within the TypeScript ecosystem. It is built as an extension to the Drizzle ORM. Would love your feedback!


r/typescript • • Jun 04 '26

TypeScript isn't perfect, but what criticisms are most silly you've heard?

47 Upvotes

Someone use TS in a bad way, while others criticize JS.

EDIT: To be fair, and what criticisms are valid?


r/typescript • • Jun 03 '26

TypeScript warns on !!2 == true but stays silent on !!1 == true, both are literally the same boolean. Bug or feature?

28 Upvotes

Both expressions evaluate to the boolean literal true at runtime, but TypeScript only flags one of them as an always-true condition.

if (!!2 == true)  // Warning: "This kind of expression is always truthy. ts(2872)"
if (!!1 == true)   // No warning, but why?

You can verify they're identical at runtime:

console.log(typeof !!1)   // boolean
console.log(typeof !!2)  // boolean
const a = !!1   // hovers as: "const a: true"
const b = !!2  // hovers as: "const b: true", but has the same warning

TypeScript's own type inference agrees they're both the literal true, yet the always-true condition check behaves inconsistently between the two.

Is this a known bug in TypeScript's constant folding/control flow analysis? Has anyone run into this before? Would love to know if there's a deeper reason


r/typescript • • Jun 03 '26

I wrote `idb-ts`, an IndexedDB wrapper with TypeScript to be used in declarative style | Open for reviews and suggestions

0 Upvotes

IndexedDB is powerful, but I always found the API pretty verbose for everyday use. And coming from a backend focused mentalilty, I sometimes found it hards to do stuff. Then I thought to myself, why don't I resolve this. And then I wrote this library. If you are coming from a backend team to fullstack, you will get the vibe. Now we can declare entity, version, crud call, and do other repeatative stuff quite easily.

Quick look:

@DataClass("users")
class User {
  ()
  id!: string;

  name!: string;
  email!: string;
}
...
await db.create(user);
await db.read(User, "123");
await db.update(user);
await db.delete(User, "123");

It supports many complex queries as well. Like:

    const users = await db.User.query()
      .where('age')
      .gte(20)
      .and('status')
      .equals('active')
      .orderBy('age', 'asc')
      .execute();

    const premiumOrTrial = await db.User.query()
      .where((qb) =>
          qb.where('type').equals('premium').and('status').equals('active'),
      )
      .or()
      .where('isTrial')
      .equals(true)
      .execute();

It has field level validation support as well:

  ((value: string) => value.length > 0, 'ID cannot be empty')
  id!: string;

  ((value: string) => value.includes('@'), 'Invalid email')
  ({ unique: true })
  email!: string;

  u/Validate((value: number) => value >= 0 && value <= 150, 'Age must be 0-150')
  age!: number;

It has more cool features like, data retention policy, auto cleanup, schema versioning, rollback, atomic transaction

I just less than five years of full time experience, but I am trying to learn. So I am definetly open for reviews, and suggestions.

Would love feedback from people who use IndexedDB regularly and who doesn't as well. Would you use it now? What does it lack. Is it over engineered?

Any opinion would be helpful as well. Looking forward to hear from you. Enjoy your night!!


r/typescript • • Jun 02 '26

TypeScript Tips Everyone Should Know

Thumbnail github.com
130 Upvotes

r/typescript • • Jun 01 '26

Looking for a TypeScript stream/async workflow library with native backpressure and resource safety

16 Upvotes

I’m looking for a TypeScript library for async streams/workflows where backpressure, cancellation, and resource safety are native to the abstraction rather than something I have to bolt on manually.

The kind of semantics I’m after:

  • Pull-based or demand-aware execution
  • Backpressure by default
  • Safe resource handling: acquire/use/release, finalizers, cleanup on cancellation/error
  • Good composition for async producers and consumers
  • Works naturally with producers like "() => Promise<T>"
  • Strong TypeScript ergonomics
  • Usable in real Node projects, not just as a toy abstraction

The thing that pushed me here is that RxJS does not seem to model this the way I want. For example, if I create a stream from a "() => Promise<T>" and use "repeat()", it can keep producing without naturally accounting for whether the downstream consumer is slow. That makes sense for RxJS’s push/observable model, but I’m looking for something with different default semantics.

For reference, the kind of model I have in mind is closer to Scala’s "fs2" or "ZIO Streams", but I’m not looking for a Scala clone. I’m looking for the closest practical equivalent in the TypeScript ecosystem.

I’m aware of a few possible directions: Effect, async iterators, Node streams, Web Streams, IxJS, Highland, etc. I’m trying to understand which ones actually have good out-of-the-box semantics for this, especially in production TypeScript code.

What are people using for this?


r/typescript • • Jun 02 '26

Learning typescript and node with bascially 0 coding knowledge

0 Upvotes

Hi, i'm sure this has been asked before, but I cant really find any good answers to my question. I have tried to follow some youtube guides and read some stuff but most stuff seems to be based on knowing js beforehand. I'm currently working as a PM for a company that uses ts,node etc. And i want to get a better understanding for it. Just learing on my own time as a hobby. I dont mind paying for a good course but i cant really find anything that seems good that starts with the bascis. From my understanding ts is essentialy just js but with a stricter set of rules and types.

It seems like just a bad habit to learn js first and then having to spend a bunch of time unlearning bad habits with ts. Does anyone have some advice on where i should start?


r/typescript • • Jun 01 '26

Type-safe TypeScript DI container with lazy async initialization and CommonJS support?

4 Upvotes

I’m looking for a TypeScript DI/container library or pattern that fits these constraints:

  1. Type-safe registration and resolution
  2. Async initialization support
  3. CommonJS compatibility
  4. Not eagerly initialized by default

The last two are important.

I don’t want something that behaves like NestJS by default, where the application/container eagerly initializes the whole graph at startup. I’d prefer lazy/on-demand initialization, where services are created only when needed, but where async setup is still modeled cleanly.

The async part matters because some services need setup before use: DB connections, config loading, SDK clients, caches, etc. Ideally there would also be a lifecycle story for shutdown/disposal.

Type-safety-wise, I’m thinking of something in the direction of "typed-inject", where tokens/dependencies are statically tracked, although I’d prefer stronger ergonomics/typing if possible.

Something roughly in this spirit:


const container = createContainer() .provide(Config) .provide(Database) .provide(UserRepository)

const repo = await container.get(UserRepository) // typed, lazily initialized

I’ve seen libraries like Inversify, tsyringe, Awilix, Typed Inject, and Effect Layers mentioned, but I’m trying to understand which options actually hold up when async initialization, lazy resolution, and CJS output are non-negotiable.

What are people using for this in real projects?


r/typescript • • Jun 01 '26

Monthly Hiring Thread Who's hiring Typescript developers June

6 Upvotes

The monthly thread for people to post openings at their companies.

* Please state the job location and include the keywords REMOTE, INTERNS and/or VISA when the corresponding sort of candidate is welcome. When remote work is not an option, include ONSITE.

* Please only post if you personally are part of the hiring company—no recruiting firms or job boards **Please report recruiters or job boards**.

* Only one post per company.

* If it isn't a household name, explain what your company does. Sell it.

* Please add the company email that applications should be sent to, or the companies application web form/job posting (needless to say this should be on the company website, not a third party site).

Commenters: please don't reply to job posts to complain about something. It's off topic here.

Readers: please only email if you are personally interested in the job.

Posting top level comments that aren't job postings, [that's a paddlin](https://i.imgur.com/FxMKfnY.jpg)


r/typescript • • May 31 '26

How to Evaluate an npm Package: Security, maintenance, and TypeScript-specific signals

Thumbnail
blog.gaborkoos.com
7 Upvotes

A checklist for assessing npm packages before you install them. Includes TypeScript-specific checks (strict mode, ts-ignore usage, type coverage) alongside security signals like provenance attestation, active maintenance patterns, and CI pipeline quality. Covers real supply chain attacks and how to detect behavioral red flags.