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

sn-typescript-util

v1.7.0

Published

A TypeScript utility for ServiceNow developers using VS Code

Readme

SN TypeScript Util

IntroductionBenefitsGetting StartedWorkflowCommandsnpmHomebrew

npm version node license

Introduction

SN TypeScript Util is a CLI that adds a TypeScript workflow on top of the ServiceNow Extension for VS Code.

Benefits

  • Write modern JavaScript with TypeScript types
  • Unlock code navigation and intelligent code completion
  • Catch bugs before syncing to the instance

Getting Started

Before starting, import a ServiceNow application into VS Code with the ServiceNow Extension for VS Code.

Install

With Homebrew on macOS:

brew install stevengregory/snts/snts

Homebrew installs the required Node.js runtime automatically.

Or install from npm with Node.js 22.12 or later:

npm install -g sn-typescript-util

Set up an application

From the root of the imported application, run:

snts --build

The build creates a ts working directory from the JavaScript files in src. It also prompts for an ECMAScript target and optional extras: a legacy BaseTable.ts interface for common runtime record fields, a Prettier configuration, and Git repository initialization.

Workflow

Start the TypeScript compiler in watch mode while working in ts:

tsc --watch

Compiled JavaScript is moved into src, where it is ready to sync to the target instance with the ServiceNow Extension for VS Code. Use snts --compile when you prefer a one-time compile.

When new JavaScript files are pulled into src from the instance, run snts --sync to add their TypeScript counterparts without replacing existing work in ts.

Commands

Installing the CLI provides the snts command.

| Command | Alias | Description | | ----------- | ----- | ------------------------------------------------------------------ | | --build | -b | Build project utility files and create ts from the src sources | | --compile | -c | Compile TypeScript in ts to JavaScript and move it to src | | --help | -h | Display help for the command | | --remove | -r | Remove and clean the ts build directory | | --sync | -s | Sync new instance-based src files to the ts directory | | --version | -v | Output the version number |

Project Layout

After setup, the important parts of an application look like this:

application/
├── src/                 # JavaScript managed by the ServiceNow extension
├── ts/                  # TypeScript working tree created by snts
│   └── Types/           # Shared interfaces and types
├── system/
└── app.config.json

The directory structure under ts mirrors supported JavaScript files under src, with .js files represented as .ts files.

See the full sample application layout for Script Include and Service Portal widget examples.

License

MIT License