UNPKG

@compositive/foundation

Version:

Compositive framework foundation package.

38 lines 1.41 kB
import type { SerializableTo } from "@compositive/commons-serialization"; export declare type FontWeightMap = { Thin: 100; ExtraLight: 200; Light: 300; Regular: 400; Medium: 500; SemiBold: 600; Bold: 700; ExtraBold: 800; Black: 900; }; export declare class FontWeight<N extends keyof FontWeightMap = keyof FontWeightMap> implements SerializableTo<number> { #private; static readonly Thin: FontWeight<"Thin">; static readonly ExtraLight: FontWeight<"ExtraLight">; static readonly Light: FontWeight<"Light">; static readonly Regular: FontWeight<"Regular">; static readonly Medium: FontWeight<"Medium">; static readonly SemiBold: FontWeight<"SemiBold">; static readonly Bold: FontWeight<"Bold">; static readonly ExtraBold: FontWeight<"ExtraBold">; static readonly Black: FontWeight<"Black">; static fromJson(value: number): Promise<FontWeight>; static for(weight: number): FontWeight; readonly value: FontWeightMap[N]; readonly name: N; private constructor(); protected get index(): number; get bolder(): FontWeight | undefined; get lighter(): FontWeight | undefined; get fallbacks(): Readonly<FontWeight[]>; isLighterThan(other: FontWeight): boolean; isBolderThan(other: FontWeight): boolean; toString(): string; toJson(): Promise<number>; } //# sourceMappingURL=FontWeight.d.ts.map