@phryneas/ts-version
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

@phryneas/ts-version

A little utility type package that allows you to access the current TypeScript version from your types.

import { TSVersion } from "@phryneas/ts-version";

type Version = `${TSVersion.Major}.${TSVersion.Minor}`;

type VersionDependentType = TSVersion.AtLeast<4, 7> extends true
  ? "we're in the future!"
  : "it's the stone age!";

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i @phryneas/ts-version

      Weekly Downloads

      92

      Version

      1.0.2

      License

      MIT

      Unpacked Size

      82.4 kB

      Total Files

      74

      Last publish

      Collaborators

      • phryneas