
Security News
GitHub Actions Pricing Whiplash: Self-Hosted Actions Billing Change Postponed
GitHub postponed a new billing model for self-hosted Actions after developer pushback, but moved forward with hosted runner price cuts on January 1.
[](https://github.com/dqn/calc-ts/actions) [](https://www.npmjs.com/package/calc-ts)
Type-level calculator.
Using npm:
$ npm install calc-ts
Using yarn:
$ yarn add calc-ts
import type { Calculate } from "calc-ts";
type Result1 = Calculate<"1 + 2">; // 3
type Result2 = Calculate<"1+2+3-4">; // 2
type Result3 = Calculate<"2 * (7 + (8))">; // 30
type Result4 = Calculate<"5 - / 9">; // never
const num1: Calculate<"1 + 4"> = 5; // OK
const num2: Calculate<"1 + 4"> = 6; // Type '6' is not assignable to type '5'.ts(2322)
type ValidExpr<S extends string> = Calculate<S> extends never ? never : S;
function safeEval<S extends string>(expr: ValidExpr<S>): Calculate<S> {
return eval(expr);
}
const result1 = safeEval("12 + 3"); // 15
const result2 = safeEval("12 = 3"); // Argument of type 'string' is not assignable to parameter of type 'never'. ts(2345)
declare const expr: string;
const result3 = safeEval(expr); // Argument of type 'string' is not assignable to parameter of type 'never'. ts(2345)
MIT
FAQs
[](https://github.com/dqn/calc-ts/actions) [](https://www.npmjs.com/package/calc-ts)
The npm package calc-ts receives a total of 0 weekly downloads. As such, calc-ts popularity was classified as not popular.
We found that calc-ts demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
GitHub postponed a new billing model for self-hosted Actions after developer pushback, but moved forward with hosted runner price cuts on January 1.

Research
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.

Security News
Socket CTO Ahmad Nassri shares practical AI coding techniques, tools, and team workflows, plus what still feels noisy and why shipping remains human-led.