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

Not working with default parameters #6

Closed
tjoskar opened this issue Dec 3, 2015 · 1 comment
Closed

Not working with default parameters #6

tjoskar opened this issue Dec 3, 2015 · 1 comment

Comments

@tjoskar
Copy link
Owner

tjoskar commented Dec 3, 2015

If a user has the following code:

const five = 5;

@autoInject
class Test {
    constructor(db: Db, some = five) {
        console.log(some);
    }
}

It will become:

...
Test = __decorate([
        autoinject_1.autoInject, 
        __metadata('design:paramtypes', [Db, Object])
    ], Test);

Which is bad... because we can't get access to five anymore.

@tjoskar
Copy link
Owner Author

tjoskar commented Dec 3, 2015

Close with 53fa2b9

@tjoskar tjoskar closed this as completed Dec 3, 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

No branches or pull requests

1 participant