New:Microsoft Teams Notifications Are Now Available in Socket.Learn more
Get Started

@syncrona/typescript-plugin

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@syncrona/typescript-plugin

SyncroNow AI build plugin that type-checks and transpiles .ts files with the TypeScript compiler (honors tsconfig.json).

latest
Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
30
130.77%
Maintainers
1
Weekly downloads
 
Created
Source

@syncrona/typescript-plugin

npmnodelicenseCITypeScript

Overview

SyncroNow AI is the ServiceNow scoped-application toolchain behind the syncrona CLI. This package is one of its build plugins: register it in the rules array of your sync.config.js and syncrona build runs it over every matching file.

This plugin allows you to run the TypeScript compiler on .ts files. Supports tsconfig.json files.

Installation

npm i -D @syncrona/typescript-plugin

Options

KeyTypeDefaultDescription
transpilebooleantrueWhether or not the contents of the typescript file should be transpiled. Useful if you want to use Babel to transpile instead but still want type checking
compilerOptionstypescript.CompilerOptionsnullSame as compilerOptions in a tsconfig.json file

Order of Configurations

Later entries win on every overlapping key:

  • tsconfig.json — the nearest one found by walking up from the file being compiled, with its extends chain resolved. This is the base.
  • compilerOptions from sync.config.js — merged on top, so a value set here overrides the same key in tsconfig.json. Both the string spelling (target: "ES2021") and an already-resolved typescript.ScriptTarget value are accepted; an unparsable value fails the push instead of being ignored.
  • The plugin's own defaults, applied only where neither source set the key:
    • targetES2021, the ECMAScript level current ServiceNow releases support. Pinned deliberately, because TypeScript's own default tracks the newest language level and changes between compiler majors.
    • module → follows the effective target (ES2015 for an ES2015+ target, CommonJS below it), which is what TypeScript 5 did before its default moved.
    • moduleResolutionBundler, but only where TypeScript would otherwise default to Classic, which cannot see node_modules at all. A tsconfig.json that already implies a node-aware resolution is left alone.
    • alwaysStrictfalse for the emit when neither strict nor alwaysStrict was configured anywhere, so the transpiled output carries no "use strict" prologue. ServiceNow scripts lean on implicit globals, which strict mode turns into runtime errors.

The same effective option set drives the type check and the emit, so a knob that relaxes checking (noImplicitAny, skipLibCheck, strict) really does unblock a push.

Example Usage

This example takes .ts files and only type checks them.

// sync.config.js
module.exports = {
  rules: [
    {
      match: /\.ts$/,
      plugins: [
        {
          name: "@syncrona/typescript-plugin",
          options: {
            transpile: false,
          },
        },
      ],
    },
  ],
};

FAQs

Package last updated on 25 Aug 2026

Related posts