mirror of
https://github.com/penpot/penpot.git
synced 2026-02-12 14:42:56 +00:00
📚 Document better the tokens value in plugins API
This commit is contained in:
12
plugins/libs/plugin-types/index.d.ts
vendored
12
plugins/libs/plugin-types/index.d.ts
vendored
@@ -4960,6 +4960,15 @@ export interface TokenTypography extends TokenBase {
|
||||
readonly resolvedValue: TokenTypographyValue[] | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Any possible type of value field in a token.
|
||||
*/
|
||||
export type TokenValueString =
|
||||
| TokenShadowValueString
|
||||
| TokenTypographyValueString
|
||||
| string
|
||||
| string[];
|
||||
|
||||
/**
|
||||
* The supported Design Tokens in Penpot.
|
||||
*/
|
||||
@@ -5086,9 +5095,10 @@ export interface TokenSet {
|
||||
* @param type Thetype of token.
|
||||
* @param name The name of the token (required). It may contain
|
||||
* a group path, separated by `.`.
|
||||
* @param value The value of the token (required), in the string form.
|
||||
* @return Returns the created Token.
|
||||
*/
|
||||
addToken(type: TokenType, name: string, value: unknown): Token;
|
||||
addToken(type: TokenType, name: string, value: TokenValueString): Token;
|
||||
|
||||
/**
|
||||
* Adds to the catalog a new TokenSet equal to this one but with a new id.
|
||||
|
||||
Reference in New Issue
Block a user