Skip to content

Instantly share code, notes, and snippets.

@ostronom
Created October 9, 2012 15:27
Show Gist options
  • Select an option

  • Save ostronom/3859522 to your computer and use it in GitHub Desktop.

Select an option

Save ostronom/3859522 to your computer and use it in GitHub Desktop.
module V.Views {
export class View {
public someVar: any;
// the presence of constructor doesn't affect the error triggering
}
}
module V.App {
export class Application {
public registerView(url: string, viewKlass: V.Views.View): void
{
var test = new viewKlass();
}
}
}
var app = new V.App.Application;
class TestView extends V.Views.View {
}
class TestView2 extends V.Views.View {
}
app.registerView('', TestView)
app.registerView('content/view/:slug/', TestView2)
@ostronom

ostronom commented Oct 9, 2012

Copy link
Copy Markdown
Author

(...): Value of type 'Views.View' is not newable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment