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

fix(typeahead): specify any type for formatters argument #554

Closed
wants to merge 1 commit into from

Conversation

jnizet
Copy link
Member

@jnizet jnizet commented Aug 7, 2016

The generated .d.ts file doesn't specify any as the type of the formatter argument (value) when it is defined as

inputFormatter: (value) => string;

Declaring it with an explicit any type fixes the issue:

inputFormatter: (value: any) => string;

That is quite strange, because for the attributes of NgbTypeaheadWindow which don't have a explicit type declared, like for example

@Input() results;

The corresponding attribute in the generated .d.ts file does have an explicit any type declared:

results: any;

So this looks like a bug or limitation of the typescript compiler.

@pkozlowski-opensource
Copy link
Member

So this looks like a bug or limitation of the typescript compiler

Agreed, this looks fishy. Let's get this PR in as the change doesn't hurt.

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.

None yet

2 participants