testing

Defined in: var_invariant.ts:14

A var(...) whose custom property is never declared in the same CSS text.

Property Modifier Type Description Defined in
context readonly string Surrounding CSS text for error reporting. var_invariant.ts:18
reference readonly string The undeclared custom property name (e.g. --aui-color-bg). var_invariant.ts:16
function assertVarRefsHaveDeclarations(css): void;
		

Defined in: var_invariant.ts:135

Throws if any var(...) in css has no matching custom-property declaration.

Parameter Type Description
css string Full CSS text to scan.

void

If any reference has no declaration in the same text.


function findVarRefViolations(css): readonly VarInvariantViolation[];
		

Defined in: var_invariant.ts:109

Returns all var(...) references whose custom property is never declared in css.

Parameter Type Description
css string Full CSS text to scan.

readonly VarInvariantViolation[]


function tokenTreeDts(
   typeName,
   tree,
   leafType?
): string;
		

Defined in: testing.ts:23

Emits a TypeScript interface for a derived token tree, for Monaco extraLib text.

Parameter Type Default value Description
typeName string undefined Interface identifier.
tree object undefined Derived CssToken / ScaleToken tree.
leafType string 'CssInterpolable' Identifier used for every leaf. Defaults to CssInterpolable.

string