import { isWeb } from './constants/platform' ; export class Variable { name : string ; val : string | number ; variable : string | number ; constructor ( { val , name } ) { this . val = val ; this . name = name ; this . variable = isWeb ? `var(--${ name })` : this . val ; } toString ( ) { return `${ isWeb ? this . variable : this . val }` ; } } type VariableIn = { val : string | number ; name : string ; } ; export const createVariable = ( props ) => new Variable ( props ) ; export function isVariable ( v ) { return v instanceof Variable ; }