Skip to content
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

TypeScript strange working with " and ' quotes in import #7616

Closed
mixalbl4-127 opened this issue Mar 21, 2016 · 3 comments
Closed

TypeScript strange working with " and ' quotes in import #7616

mixalbl4-127 opened this issue Mar 21, 2016 · 3 comments
Labels
Duplicate An existing issue was already created

Comments

@mixalbl4-127
Copy link

TypeScript Version:

1.7.5

Code

import {HTTP_PROVIDERS} from 'angular2/http'; // <-- one quotes !
import {Component} from "angular2/core";
import {Http} from "angular2/http"; // <-- two quotes !

@Component({
    templateUrl: 'tst.html',
    viewProviders: [HTTP_PROVIDERS]
})

export class tst {
    constructor(private http1:Http) {
        http1.get('tst');
    }
}

Expected behavior:
After compilation (js file):
System.register(['angular2/http', "angular2/core"] ...

Actual behavior:
After compilation (js file):
System.register(['angular2/http', "angular2/core", "angular2/http"] ...

I have a many problems with this bug
bug example (with demo): http://stackoverflow.com/q/36134033/2051938

@kitsonk
Copy link
Contributor

kitsonk commented Mar 21, 2016

Silly question, why are you not destructuring all your desired objects from a module with a single import statement?

@vladima vladima added the Duplicate An existing issue was already created label Mar 21, 2016
@vladima
Copy link
Contributor

vladima commented Mar 21, 2016

duplicate of #6681, already fixed in master

@vladima vladima closed this as completed Mar 21, 2016
@mixalbl4-127
Copy link
Author

@kitsonk

  1. inattention
  2. WebStorm editor automatically generates imports

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Duplicate An existing issue was already created
Projects
None yet
Development

No branches or pull requests

3 participants