Skip to content

Latest commit

 

History

History
13 lines (9 loc) · 368 Bytes

README.md

File metadata and controls

13 lines (9 loc) · 368 Bytes

@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!";