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

@types/ember__controller

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/ember__controller

TypeScript definitions for @ember/controller

  • 4.0.12
  • 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
Maintainers
1
Created
Source

Installation

npm install --save @types/ember__controller

Summary

This package contains type definitions for @ember/controller (https://emberjs.com/api/ember/4.0/modules/@ember%2Fcontroller).

Details

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

index.d.ts

import EmberObject from "@ember/object";
import ActionHandler from "@ember/object/-private/action-handler";
import ComputedProperty from "@ember/object/computed";
import Mixin from "@ember/object/mixin";

// eslint-disable-next-line @definitelytyped/strict-export-declare-modifiers
type QueryParamTypes = "boolean" | "number" | "array" | "string";
// eslint-disable-next-line @definitelytyped/strict-export-declare-modifiers
type QueryParamScopeTypes = "controller" | "model";

// eslint-disable-next-line @definitelytyped/strict-export-declare-modifiers
interface QueryParamConfig {
    type?: QueryParamTypes | undefined;
    scope?: QueryParamScopeTypes | undefined;
    as?: string | undefined;
}

/**
 * Additional methods for the Controller.
 */
interface ControllerMixin extends ActionHandler {
    /**
     * @deprecated until 5.0. Use `RouterService.reaplceWith` instead.
     */
    replaceRoute(name: string, ...args: any[]): void;
    /**
     * @deprecated until 5.0. Use `RouterService.transitionTo` instead.
     */
    transitionToRoute(name: string, ...args: any[]): void;
    /**
     * @deprecated until 5.0. Use `RouterService.transitionTo` instead.
     */
    transitionToRoute(...args: any[]): void;
    model: unknown;
    queryParams: Readonly<Array<string | Record<string, QueryParamConfig | string | undefined>>>;
    target: object;
}

export default class Controller extends EmberObject {}
// eslint-disable-next-line @typescript-eslint/no-empty-interface -- used for declaration merge
export default interface Controller extends ControllerMixin {}

export function inject(): ComputedProperty<Controller>;
export function inject<K extends keyof Registry>(name: K): ComputedProperty<Registry[K]>;
export function inject(target: object, propertyKey: string | symbol): void;

// A type registry for Ember `Controller`s. Meant to be declaration-merged
// so string lookups resolve to the correct type.
// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface Registry extends Record<string, Controller | undefined> {}

declare module "@ember/owner" {
    interface DIRegistry {
        controller: Registry;
    }
}

// We need to define the `ControllerMixin` type above, but it is not public API
// and should not be importable, so shut off auto-importing.
export {};

Additional Details

  • Last updated: Tue, 16 Jan 2024 17:36:15 GMT
  • Dependencies: @types/ember__object

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