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

aurelia-binding.d.ts beta.1.0.1 issues with TypeScript noImplicitAny=true #232

Closed
nil4 opened this issue Nov 16, 2015 · 9 comments
Closed

Comments

@nil4
Copy link
Contributor

nil4 commented Nov 16, 2015

The file aurelia-binding.d.ts at version 1.0.0-beta.1.0.1 contains the following definitions that cause errors when the noImplicitAny TypeScript option is enabled (note the initialize and register functions have no parameter signatures):

  export class ValueConverterResource {
    static convention(name: string): ValueConverterResource;
    constructor(name: string);
    initialize(container, target): void;
    register(registry, name): void;
  }
 export class BindingBehaviorResource {
    static convention(name: string): BindingBehaviorResource;
    constructor(name: string);
    initialize(container, target): void;
    register(registry, name): void;
  }
@EisenbergEffect
Copy link
Contributor

This sounds like an awesome opportunity to submit a pull request :)

@nil4 nil4 closed this as completed Nov 16, 2015
@nil4
Copy link
Contributor Author

nil4 commented Nov 16, 2015

Apologies, I am new at this GitHub thing; I wanted to create a pull request against this repository but I seem to have done something completely different. Let me try again.

@nil4
Copy link
Contributor Author

nil4 commented Nov 17, 2015

@EisenbergEffect: pull request #234 created.

@mikeobrien
Copy link

I'm hitting another issue with 1.0.0-beta.1.0.1:

aurelia-binding@1.0.0-beta.1.0.1/aurelia-binding.d.ts(58,16): error TS7006: Parameter 'container' implicitly has an 'any' type.

So how are these .d.ts files being maintained? I was under the impression they were being generated by Babel so not something we could just fix directly in the .d.ts file and submit a PR for.

Also, another thought, what would you think about adding a compile step to your build to compile the .d.ts files? I regularly run into problems with these files when I upgrade that could have been caught with a compile step.

I'm not sure how this is being handled, so maybe missing something.

@EisenbergEffect
Copy link
Contributor

The binding library doesn't use code generation for it's d.ts anymore, so you can just submit a PR against the d.ts file to fix issues.

@mikeobrien
Copy link

Thx, good to know. Is this true for all Aurelia libs or just some like binding?

@EisenbergEffect
Copy link
Contributor

Only for binding at the moment. The rest have their d.ts files generated from source.

@EisenbergEffect
Copy link
Contributor

We may look at converting all libraries to have custom d.ts similar to this repo in the future.

@mikeobrien
Copy link

Great, thx for the info!

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

3 participants