@types/angular-media-queries
TypeScript icon, indicating that this package has built-in type declarations

0.6.25 • Public • Published

Installation

npm install --save @types/angular-media-queries

Summary

This package contains type definitions for angular-media-queries (https://github.com/jacopotarantino/angular-match-media).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/angular-media-queries.

index.d.ts

/// <reference types="angular" />

import * as angular from "angular";

declare module "angular" {
    export namespace matchmedia {
        interface IScreenSize {
            // Returns a value indicating if the current device has a retina screen
            isRetina: boolean;

            is(list: string[] | string): boolean;

            // Executes the callback function on window resize with the match truthiness as the first argument.
            // Returns the current match truthiness.
            // The 'scope' parameter is optional. If it's not passed in, '$rootScope' is used.
            on(list: string[] | string, callback: (result: boolean) => void, scope?: angular.IScope): boolean;

            // Executes the callback function ONLY when the match differs from previous match.
            // Returns the current match truthiness.
            // The 'scope' parameter is required for cleanup reasons (destroy event).
            onChange(scope: angular.IScope, list: string[] | string, callback: (result: boolean) => void): boolean;

            // Executes the callback only when inside of the particular screensize.
            // The 'scope' parameter is optional. If it's not passed in, '$rootScope' is used.
            when(list: string[] | string, callback: (result: boolean) => void, scope?: angular.IScope): boolean;
        }
    }
}

Additional Details

  • Last updated: Mon, 20 Nov 2023 23:36:23 GMT
  • Dependencies: @types/angular

Credits

These definitions were written by Joao Monteiro.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/angular-media-queries

Weekly Downloads

37

Version

0.6.25

License

MIT

Unpacked Size

5.47 kB

Total Files

5

Last publish

Collaborators

  • types