JSTools Weekly — ✨2023#8: TS-Reset: A ‘CSS reset’ For TS, Improving JS Types
Tags: javascript, webdev, node, typescript
Published: 2023-03-01 18:29:05

Hi JS developers👋
[JSTools Weekly](https://jstools.substack.com/) newsletter, issue [2023#8](https://jstools.substack.com/p/2023-newjstools-8) (top new JS releases) just released.


![new JS tools, issue 2023#8](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2w3crevvli1atpauqyt0.png)

[**ts-reset**](https://github.com/total-typescript/ts-reset)**:** A 'CSS reset' for TypeScript, improving types for common JavaScript API's

With `ts-reset`:

-   👍 `.json` (in `fetch`) and `JSON.parse` both return `unknown`

-   ✅ `.filter(Boolean)` behaves EXACTLY how you expect

-   🥹 `array.includes` is widened to be more ergonomic

-   🚀 And several more changes!

```
// Import in a single file, then across your whole project...
import "@total-typescript/ts-reset";

// .filter just got smarter!
const filteredArray = [1, 2, undefined].filter(Boolean); // number[]

// Get rid of the any's in JSON.parse and fetch
const result = JSON.parse("{}"); // unknown

fetch("/")
  .then((res) => res.json())
  .then((json) => {
    console.log(json); // unknown
  });
```

[**sonner**](https://github.com/emilkowalski/sonner)**:** An opinionated toast component for React.


[**bling**](https://github.com/TanStack/bling)**:** 💍 Framework agnostic transpilation utilities for client/server RPCs, env isolation, islands, module splitting, and more.

[**garph**](https://github.com/stepci/garph)**:** A tRPC-like schema-builder for GraphQL


[**picorpc**](https://github.com/fabiospampinato/picorpc)**:** A tiny RPC library and spec, inspired by JSON-RPC 2.0 and tRPC.

[**yal**](https://github.com/srsholmes/yal)**:** Yal (Yet Another Launcher) is a launcher app similar to Alfred, Raycast, ScriptKit, Spotlight, and many others.

[**suspense**](https://github.com/bvaughn/suspense)**:** Utilities for working with React Suspense

[**nuxt-scheduler**](https://github.com/jurassicjs/nuxt-scheduler)**:** Create scheduled jobs with human readable time settings

```
import { useScheduler } from "#scheduler";
import say from "~/server/app/services/say";

export default function startScheduler() {
  const scheduler = useScheduler();

  scheduler.run(() => {
    say("this should run every 5 seconds");
  }).everySeconds(5);

  // create as many jobs as you want here
}
```

[**minds**](https://github.com/dosco/minds)**:** MindsJS - Build AI powered workflows easily

[**aifiles**](https://github.com/jjuliano/aifiles)**:** A CLI that organize and manage your files using AI

-   Organize audio, video, pictures, documents, archives, and other types of files

-   Automatically extract relevant information from your files using OpenAI ChatGPT.

-   Automatically add tag and comments to the file

-   Organize your files into categories and directories based on their content

-   Rename your files using a customizable naming convention

-   Store your files in a designated directory

[**sveltekit-superforms**](https://github.com/ciscoheat/sveltekit-superforms)**:** Supercharge your SvelteKit forms with this powerhouse of a library!

-   Merging `PageData` and `ActionData` - Stop worrying about which one to use and how, just focus on your data.

-   Server-side data validation using Zod, with output that can be used directly on the client.

-   Auto-centering and auto-focusing on invalid form fields.

-   Tainted form detection, prevents the user from losing data if navigating away from an unsaved form.

-   No JS required as default, but full support for progressive enhancement.

-   Automatically coerces the string data from `FormData` into correct types.

-   For advanced data structures, forget about the limitations of `FormData` - Send your forms as devalued JSON, transparently.

-   and more

[**nuxt-medusa**](https://github.com/Baroshem/nuxt-medusa)**:** 🛍️ Medusa module for Nuxt

-   Nuxt 3 ready

-   Wrapper around `@medusajs/medusa-js`

-   Handy composables like `useMedusaClient`

-   Usage in API server routes with `serverMedusaClient`

-   TypeScript support

[**ts-async-kit**](https://github.com/NicolasLopes7/ts-async-kit)**:** the easiest API to deal with promises in Typescript. Currently, ↩️ Retrying 🏃‍♂️ looping & 😴 sleeping

[**concurrent.js**](https://github.com/bitair-org/concurrent.js)**:** Easy Multithreading for JavaScript (Node.js, Deno & Browser)

-   Has no runtime dependency.

-   Built with Node.js and uses the ECMAScript module system.

-   Alters nothing, no native nor programmer-defined.

-   Written in TypeScript with the strictest ESNext config.

-   Provides a strongly-typed syntax.

-   Built upon web workers (a.k.a. worker threads).

-   Creates a worker once and reuses it.

-   Automatically cleans up a worker's memory.

-   Automatically creates and terminates workers (scale up/down).

-   Packaged as platform-specific bundles that target ES2020.

[See full list of new javascript tools](https://jstools.substack.com/p/2023-newjstools-8)