type CSSOMString = string type FontFaceLoadStatus = 'unloaded' | 'loading' | 'loaded' | 'error' type FontFaceSetStatus = 'loading' | 'loaded' interface FontFace { family: CSSOMString style: CSSOMString weight: CSSOMString stretch: CSSOMString unicodeRange: CSSOMString variant: CSSOMString featureSettings: CSSOMString variationSettings: CSSOMString display: CSSOMString readonly status: FontFaceLoadStatus readonly loaded: Promise load(): Promise } interface FontFaceSet { readonly status: FontFaceSetStatus readonly ready: Promise check(font: string, text?: string): Boolean load(font: string, text?: string): Promise } declare global { interface Document { fonts: FontFaceSet } }