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

@types/ember__modifier

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/ember__modifier

TypeScript definitions for @ember/modifier

  • 4.0.9
  • ts4.6
  • ts4.7
  • ts4.8
  • ts4.9
  • ts5.0
  • ts5.1
  • ts5.2
  • ts5.3
  • ts5.4
  • ts5.5
  • ts5.6
  • ts5.7
  • ts5.8
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
8.6K
increased by14.45%
Maintainers
1
Weekly downloads
 
Created
Source

Installation

npm install --save @types/ember__modifier

Summary

This package contains type definitions for @ember/modifier (https://github.com/emberjs/ember.js).

Details

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

index.d.ts

import Owner from "@ember/owner";
import { Opaque } from "ember/-private/type-utils";

// In normal TypeScript, this modifier is essentially an opaque token
// that just needs to be importable. Declaring it with a unique interface
// like this, however, gives tools like Glint (that DO have a richer
// notion of what it is) a place to install more detailed type information.
export interface OnModifier extends Opaque<"modifier:on"> {}

/**
 * The `{{on}}` modifier lets you easily add event listeners.
 *
 * @see https://api.emberjs.com/ember/4.1/classes/Ember.Templates.helpers/methods/on?anchor=on
 */
export const on: OnModifier;

/**
 * Given a modifier manager factory and a modifier, tell Ember to set the
 * manager returned by that factory as the manager for the modifier.
 *
 * @param factory A function which takes an `owner` and returns a [modifier
 *   manager](https://emberjs.github.io/rfcs/0373-Element-Modifier-Managers.html).
 * @param modifier The modifier definition to associate with the manager.
 */
export function setModifierManager<T>(factory: (owner: Owner) => unknown, modifier: T): T;

export interface ModifierCapabilitiesVersions {
    // passes factoryFor(...).class to `.createModifier`
    // uses args proxy, does not provide a way to opt-out
    "3.22": {
        disableAutoTracking?: boolean;
    };
}

export interface ModifierCapabilities {
    disableAutoTracking: boolean;
}

/**
 * Given a target version of Ember, return an opaque token which Ember can use
 * to determine what a given modifier manager supports.
 */
export function capabilities<Version extends keyof ModifierCapabilitiesVersions>(
    managerAPI: Version,
    optionalFeatures?: ModifierCapabilitiesVersions[Version],
): ModifierCapabilities;

Additional Details

Credits

These definitions were written by Krystan HuffMenne, James C. Davis, and Peter Wagenet.

FAQs

Package last updated on 16 Jan 2024

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