Skip to content

Instantly share code, notes, and snippets.

@perlun

perlun/route-bad1.ts

Created Mar 26, 2018
Embed
What would you like to do?
ember-cli-typescript with Route mixins
// Almost works, but it still complains about a few missing properties with this approach
export default class ProtectedRoute extends Ember.Route.extend(AuthenticatedRouteMixin) {
public actions: null;
public activate: null;
public afterModel: null;
public beforeModel: null;
public controller: null;
public controllerFor: null;
public controllerName: null;
public deactivate: null;
public didTransition: null;
public disconnectOutlet: null;
public error: null;
public get: null;
public getProperties: null;
public has: null;
public loading: null;
public model: null;
public modelFor: null;
public notifyPropertyChange: null;
public off: null;
public on: null;
public one: null;
public paramsFor: null;
public queryParams: null;
public redirect: null;
public refresh: null;
public render: null;
public renderTemplate: null;
public replaceWith: null;
public resetController: null;
public routeName: null;
public send: null;
public serialize: null;
public set: null;
public setProperties: null;
public setupController: null;
public store: null;
public templateName: null;
public transitionTo: null;
public trigger: null;
public willTransition: null;
}
// Works, but no mixin. :/
export default class ProtectedRoute extends Ember.Route.extend() {
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.