Security News
JavaScript Leaders Demand Oracle Release the JavaScript Trademark
In an open letter, JavaScript community leaders urge Oracle to give up the JavaScript trademark, arguing that it has been effectively abandoned through nonuse.
@tokens-studio/types
Advanced tools
![NPM version badge](https://img.shields.io/npm/v/@tokens-studio/types) ![License badge](https://img.shields.io/github/license/tokens-studio/types)
This repository is a collection of type definitions relating to Tokens Studio.
It currently exports types for all the available types of Design Tokens, as they exist in the Tokens Studio Figma Plugin.
It also includes some type definitions for things like the $themes.json
schema, HSLA/RGBA values, color modifier options and composition tokens.
With NPM:
npm install @tokens-studio/types
See our documentation site here
import { SingleTypographyToken } from '@tokens-studio/types';
function logTypographyToken(token: SingleTypographyToken) {
// because token is properly typed, we get autocomplete
// e.g. token.type will be typed as "typography"
const { value } = token;
if (typeof value === 'string') {
console.log(value);
} else {
// due to proper type, we get these properties autosuggested properly
console.log(`${value.fontWeight} ${value.fontSize}/${value.lineHeight} ${value.fontFamily}`);
}
}
0.4.0
FAQs
![NPM version badge](https://img.shields.io/npm/v/@tokens-studio/types) ![License badge](https://img.shields.io/github/license/tokens-studio/types)
We found that @tokens-studio/types demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers 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
In an open letter, JavaScript community leaders urge Oracle to give up the JavaScript trademark, arguing that it has been effectively abandoned through nonuse.
Security News
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
Security News
Floating dependency ranges in npm can introduce instability and security risks into your project by allowing unverified or incompatible versions to be installed automatically, leading to unpredictable behavior and potential conflicts.