Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(types): added name to format, and export Named #714

Merged
merged 1 commit into from
Oct 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions types/Format.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,6 @@ export interface FormatterArguments {
export type Formatter = (arguments: FormatterArguments) => string;

export interface Format {
name: string;
formatter: Formatter;
}
3 changes: 2 additions & 1 deletion types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import {Platform as _Platform} from './Platform';
import {Transform as _Transform} from './Transform';
import {TransformedToken as _TransformedToken, TransformedTokens as _TransformedTokens} from './TransformedToken';
import {TransformGroup as _TransformGroup} from './TransformGroup';
import {Named} from './_helpers';
import {Named as _Named} from './_helpers';

// Because this library is used in Node and needs to be accessible
// as a CommonJS module, we are declaring it as a namespace so that
Expand All @@ -51,6 +51,7 @@ declare namespace StyleDictionary {
type TransformedToken = _TransformedToken;
type TransformedTokens = _TransformedTokens;
type TransformGroup = _TransformGroup;
type Named<T> = _Named<T>

interface Core {
VERSION: string;
Expand Down