Skip to content

RebeccaStevens/type-to-string

Repository files navigation

Type to String

Get a string representation of a TypeScript type.

npm version CI Coverage Status
code style: prettier GitHub Discussions BSD 3 Clause license Commitizen friendly semantic-release

This project is really just me playing with different ways to get string representions of TypeScript types.

For most users, you can probably just use TypeScript built in functions:

checker.typeToString(type);
typeNode.getText();

Donate

Any donations would be much appreciated. 😄

Installation

# Install with npm
npm install type-to-string

# Install with pnpm
pnpm add type-to-string

# Install with yarn
yarn add type-to-string