Open Design Tokens
Preparing search index...
validator
isTokenOfType
Function isTokenOfType
isTokenOfType
<
T
extends
|
"number"
|
"color"
|
"dimension"
|
"fontFamily"
|
"fontWeight"
|
"duration"
|
"cubicBezier"
|
"strokeStyle"
|
"border"
|
"transition"
|
"shadow"
|
"gradient"
|
"typography"
,
>
(
token
:
DesignToken
,
type
:
T
,
)
:
token
is
TypedToken
<
T
>
Narrows a token to a specific
$type
. Checks the explicit
$type
only.
Type Parameters
T
extends
|
"number"
|
"color"
|
"dimension"
|
"fontFamily"
|
"fontWeight"
|
"duration"
|
"cubicBezier"
|
"strokeStyle"
|
"border"
|
"transition"
|
"shadow"
|
"gradient"
|
"typography"
Parameters
token
:
DesignToken
type
:
T
Returns
token
is
TypedToken
<
T
>
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
Open Design Tokens
Loading...
Narrows a token to a specific
$type. Checks the explicit$typeonly.