Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@types/fontfaceobserver

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/fontfaceobserver

TypeScript definitions for fontfaceobserver

  • 2.1.2
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

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

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: Wed, 18 Oct 2023 01:17:34 GMT
  • Dependencies: none

Credits

These definitions were written by Rand Scullard.

FAQs

Package last updated on 18 Oct 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc