npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@signaltree/callable-syntax

v7.3.0

Published

Optional callable syntax transform for SignalTree reactive JSON. Zero-runtime DX sugar for leaf signals.

Readme

@signaltree/callable-syntax

Zero-runtime callable syntax transform for SignalTree. Enables elegant developer experience that compiles away completely.

What It Does

// You write (with great DX):
tree.$.user.name('Alice');
tree.$.count((n) => n + 1);

// Transform converts to (zero overhead):
tree.$.user.name.set('Alice');
tree.$.count.update((n) => n + 1);

// Getters work unchanged:
const name = tree.$.user.name();

Installation

npm install @signaltree/core
npm install -D @signaltree/callable-syntax

Key: Install as dev dependency since it's a build-time tool only.

Setup for Teams

Angular Projects

// angular.json - add to build options
{
  "build": {
    "options": {
      "customWebpackConfig": {
        "path": "./webpack.extra.js"
      }
    }
  }
}
// webpack.extra.mjs
import { SignalTreeSyntaxWebpackPlugin } from '@signaltree/callable-syntax/webpack';

export default {
  plugins: [new SignalTreeSyntaxWebpackPlugin()],
};

Vite Projects

// vite.config.ts
import { defineConfig } from 'vite';
import { signalTreeSyntaxTransform } from '@signaltree/callable-syntax/vite';

export default defineConfig({
  plugins: [signalTreeSyntaxTransform()],
});

Development Workflow

The transform only affects build output - your TypeScript will still type-check correctly with callable syntax because SignalTree includes the necessary type augmentations.

import { signalTree } from '@signaltree/core';

const store = signalTree({
  todos: [] as Todo[],
  filter: 'all' as 'all' | 'active' | 'completed',
});

// TypeScript understands both forms:
store.$.todos(newTodos); // Callable syntax (transforms away)
store.$.todos.set(newTodos); // Direct syntax (stays as-is)

// Getters always stay the same:
const currentTodos = store.$.todos();

Production Build

In production builds, only direct Angular signal calls remain - no runtime overhead, no wrapper functions, no Proxy objects. The callable syntax is purely developer experience sugar.


### TypeScript

No per-file imports required in this repo. Types are loaded via root `tsconfig`:

- `@signaltree/core` defines callable `NodeAccessor<T>`.
- Leaves are callable `WritableSignal`s at the type level for consistent DX.
  If you’re consuming externally, include `@signaltree/callable-syntax/augmentation` in your `compilerOptions.types`.

### Configuration Options

| Option          | Description                                 | Default                                         |
| --------------- | ------------------------------------------- | ----------------------------------------------- | -------- | --------- |
| include         | Files to include (RegExp)                   | /src/.\*\.(t                                    | j)sx?$/  |
| exclude         | Files to exclude (RegExp)                   | /node_modules                                   | \.spec\. | \.test\./ |
| rootIdentifiers | Root variable names containing a SignalTree | ['tree'] (exported as DEFAULT_ROOT_IDENTIFIERS) |
| debug           | Log transformed counts                      | false                                           |

### Notes

- Pure dev-time; adds 0 bytes to production bundle.
- Does not modify runtime; you can mix standard `.set()` / `.update()` calls freely.
- Safe fallback: if plugin absent, callable writes just become runtime errors you can catch in CI (recommend lint rule if enforcing).

### License

Business Source License 1.1 (BSL-1.1) – converts to MIT on Change Date per root project license.