@types/fontfaceobserver
TypeScript definitions for fontfaceobserver
Last updated 10 years ago by types .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install @types/fontfaceobserver 
SYNC missed versions from official npm registry.

Installation

npm install --save @types/fontfaceobserver

Summary

This package contains type definitions for fontfaceobserver (https://github.com/bramstein/fontfaceobserver).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/fontfaceobserver.

index.d.ts

// Type definitions for fontfaceobserver 2.1.0
// Project: https://github.com/bramstein/fontfaceobserver
// Definitions by: Rand Scullard <https://github.com/RandScullard>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

declare namespace FontFaceObserver {
    interface FontVariant {
        weight?: number | string | undefined;
        style?: string | undefined;
        stretch?: string | undefined;
    }
}

declare class FontFaceObserver {
    /**
     * Creates a new FontFaceObserver.
     * @param fontFamilyName Name of the font family to observe.
     * @param variant Description of the font variant to observe. If a property is not present it will default to normal.
     */
    constructor(fontFamilyName: string, variant?: FontFaceObserver.FontVariant);

    /**
     * Starts observing the loading of the specified font. Immediately returns a new Promise that resolves when the font is available and rejected when the font is not available.
     * @param testString If your font doesn't contain latin characters you can pass a custom test string.
     * @param timeout The default timeout for giving up on font loading is 3 seconds. You can increase or decrease this by passing a number of milliseconds.
     */
    load(testString?: string | null, timeout?: number): Promise<void>;
}

declare module 'fontfaceobserver' {
    export = FontFaceObserver;
}

Additional Details

  • Last updated: Thu, 08 Jul 2021 14:22:28 GMT
  • Dependencies: none
  • Global values: FontFaceObserver

Credits

These definitions were written by Rand Scullard.

Current Tags

  • 2.1.0                                ...           latest (5 years ago)
  • 0.0.6                                ...           ts2.0 (8 years ago)
  • 0.0.6                                ...           ts2.1 (8 years ago)
  • 0.0.6                                ...           ts2.2 (8 years ago)
  • 0.0.6                                ...           ts2.3 (8 years ago)
  • 0.0.6                                ...           ts2.4 (8 years ago)
  • 0.0.6                                ...           ts2.5 (8 years ago)
  • 0.0.6                                ...           ts2.6 (8 years ago)
  • 0.0.6                                ...           ts2.7 (8 years ago)
  • 0.0.6                                ...           ts2.8 (8 years ago)
  • 0.0.6                                ...           ts2.9 (8 years ago)
  • 0.0.6                                ...           ts3.0 (8 years ago)
  • 0.0.6                                ...           ts3.1 (8 years ago)
  • 0.0.6                                ...           ts3.2 (8 years ago)
  • 0.0.6                                ...           ts3.3 (8 years ago)
  • 0.0.6                                ...           ts3.4 (8 years ago)
  • 0.0.6                                ...           ts3.5 (8 years ago)
  • 2.1.0                                ...           ts3.6 (5 years ago)
  • 2.1.0                                ...           ts3.7 (5 years ago)
  • 2.1.0                                ...           ts3.8 (5 years ago)
  • 2.1.0                                ...           ts3.9 (5 years ago)
  • 2.1.0                                ...           ts4.0 (5 years ago)
  • 2.1.0                                ...           ts4.1 (5 years ago)
  • 2.1.0                                ...           ts4.2 (5 years ago)
  • 2.1.0                                ...           ts4.3 (5 years ago)
  • 2.1.0                                ...           ts4.4 (5 years ago)
  • 2.1.0                                ...           ts4.5 (5 years ago)
  • 2.1.0                                ...           ts4.6 (5 years ago)

8 Versions

  • 2.1.0                                ...           5 years ago
  • 0.0.7                                ...           5 years ago
  • 0.0.6                                ...           8 years ago
  • 0.0.5                                ...           10 years ago
  • 0.0.4                                ...           10 years ago
  • 0.0.3                                ...           10 years ago
  • 0.0.2                                ...           10 years ago
  • 0.0.1                                ...           10 years ago
Maintainers (1)
Downloads
Today 0
This Week 52
This Month 79
Last Day 4
Last Week 62
Last Month 426
Dependencies (0)
None
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2013 - present © cnpmjs.org | Home |