Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/phryneas/ts-version

A little utility type package that allows you to access the current TypeScript version from your types.
https://github.com/phryneas/ts-version

library

Last synced: 15 days ago
JSON representation

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

Awesome Lists containing this project

README

        

# `@phryneas/ts-version`

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

```ts
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!";
```