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

Parameter annotations are not added to anonymous function #1760

Open
vicb opened this issue Feb 21, 2015 · 3 comments
Open

Parameter annotations are not added to anonymous function #1760

vicb opened this issue Feb 21, 2015 · 3 comments

Comments

@vicb
Copy link
Contributor

vicb commented Feb 21, 2015

See this REPL

// Options: --annotations --script --source-maps --types 
function named(a: string) {
}

function anonymousArg() {
}

anonymousArg(function(a: string) {});

named() has parameter annotations, as expected.

However there is no way to get the parameter annotations for the anonymous function passed to anonymousArg

Context: For angular2 test, we would like to be able to inject classes in test cases:

it('should inject classes in TC`, function(klass: InjectableClass) {
 // klass should be instantiated via the injector
});
@SerkanSipahi
Copy link

@vicb Do you know if "Parameter annotations" are scheduled with arrow function? I have tested it yesterday and got an error.

See here link

@vicb
Copy link
Contributor Author

vicb commented Feb 23, 2015

@SerkanSipahi seems like there is no plan ti support this, check #1580

@SerkanSipahi
Copy link

Thanks

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

2 participants