@oslokommune/punkt-elements
Version:
Komponentbiblioteket til Punkt, et designsystem laget av Oslo Origo
14 lines (13 loc) • 435 B
TypeScript
/**
* Booleanish type that accepts boolean or string "true"/"false"
* This allows attributes to be set as strings in HTML
*/
export type Booleanish = boolean | 'true' | 'false';
/**
* Converter for booleanish attributes
* Converts string "true"/"false" to boolean values
*/
export declare const booleanishConverter: {
fromAttribute(value: string | boolean | null): boolean;
toAttribute(value: boolean): string | null;
};