@types/ember__controller v4.0.12
Installation
npm install --save @types/ember__controller
Summary
This package contains type definitions for @ember/controller (https://emberjs.com/api/ember/3.16/modules/@ember%2Fcontroller).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ember__controller/v3.
index.d.ts
// Type definitions for non-npm package @ember/controller 3.16
// Project: https://emberjs.com/api/ember/3.16/modules/@ember%2Fcontroller
// Definitions by: Mike North <https://github.com/mike-north>
// Chris Krycho <https://github.com/chriskrycho>
// Dan Freeman <https://github.com/dfreeman>
// James C. Davis <https://github.com/jamescdavis>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 3.7
import ActionHandler from '@ember/object/-private/action-handler';
import Mixin from '@ember/object/mixin';
import EmberObject from '@ember/object';
import ComputedProperty from '@ember/object/computed';
// tslint:disable-next-line strict-export-declare-modifiers
type QueryParamTypes = 'boolean' | 'number' | 'array' | 'string';
// tslint:disable-next-line strict-export-declare-modifiers
type QueryParamScopeTypes = 'controller' | 'model';
// tslint:disable-next-line strict-export-declare-modifiers
interface QueryParamConfig {
type?: QueryParamTypes | undefined;
scope?: QueryParamScopeTypes | undefined;
as?: string | undefined;
}
/**
* Additional methods for the Controller.
*/
export interface ControllerMixin extends ActionHandler {
replaceRoute(name: string, ...args: any[]): void;
/**
* @deprecated use transitionTo method of RouterService
*/
transitionToRoute(name: string, ...args: any[]): void;
/**
* @deprecated use transitionTo method of RouterService
*/
transitionToRoute(...args: any[]): void;
model: any;
queryParams: Array<string | Record<string, QueryParamConfig | string | undefined>>;
target: object;
}
export const ControllerMixin: Mixin<ControllerMixin>;
export default class Controller extends EmberObject.extend(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.
// tslint:disable-next-line no-empty-interface
export interface Registry {}
Additional Details
- Last updated: Fri, 21 Jan 2022 19:02:04 GMT
- Dependencies: @types/ember__object
- Global values: none
Credits
These definitions were written by Mike North, Chris Krycho, Dan Freeman, and James C. Davis.
4 months ago
4 months ago
6 months ago
7 months ago
8 months ago
8 months ago
6 months ago
7 months ago
8 months ago
6 months ago
8 months ago
9 months ago
6 months ago
11 months ago
11 months ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
5 years ago
5 years ago
5 years ago
6 years ago
6 years ago
6 years ago
6 years ago