4.0.12 • Published 4 months ago

@types/ember__controller v4.0.12

Weekly downloads
33,871
License
MIT
Repository
github
Last release
4 months ago

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

Credits

These definitions were written by Mike North, Chris Krycho, Dan Freeman, and James C. Davis.

3.16.14

4 months ago

4.0.12

4 months ago

3.16.13

6 months ago

4.0.9

7 months ago

4.0.8

8 months ago

3.16.9

8 months ago

3.16.12

6 months ago

3.16.11

7 months ago

3.16.10

8 months ago

4.0.10

6 months ago

4.0.7

8 months ago

4.0.6

9 months ago

4.0.11

6 months ago

3.16.8

11 months ago

4.0.5

11 months ago

4.0.4

1 year ago

4.0.3

2 years ago

4.0.2

2 years ago

4.0.1

2 years ago

3.16.7

2 years ago

4.0.0

2 years ago

3.16.6

3 years ago

3.16.5

3 years ago

3.16.4

3 years ago

3.16.3

4 years ago

3.16.2

4 years ago

3.16.1

4 years ago

3.16.0

4 years ago

3.0.8

4 years ago

3.0.7

4 years ago

3.0.6

5 years ago

3.0.5

5 years ago

3.0.4

5 years ago

3.0.3

6 years ago

3.0.2

6 years ago

3.0.1

6 years ago

3.0.0

6 years ago