Skip to content

Style/typescript improvements #881

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 18, 2015

Conversation

masimplo
Copy link
Contributor

Two little changes.
First in Visual Studio Code although having installed angular typings using tsd it refused to recognise ng.* declarations. Looking through the actual d.ts file, I noticed that ng is an alias for angular.

declare var angular: angular.IAngularStatic;
// Collapse angular into ng
import ng = angular;

Replacing ng.* with angular.* fixed the issue and Visual Studio, WebStorm and Atom are all happy with it. Not sure why it is not picking it up, bug angular.* seems more correct anyway (apart from the extra space it takes).

Secondly, typescript has a nice shorthand for declaring class properties for constructor parameters which cleans up the code a bit (produced js is identical) and thought it would nice to use them in your templates.

@Swiip
Copy link
Owner

Swiip commented Nov 18, 2015

👍

Swiip added a commit that referenced this pull request Nov 18, 2015
@Swiip Swiip merged commit ea69c14 into Swiip:master Nov 18, 2015
@zckrs zckrs mentioned this pull request Nov 23, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants