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 typing for StageComponent #46

Closed
llicht opened this issue Nov 17, 2016 · 4 comments
Closed

Typescript typing for StageComponent #46

llicht opened this issue Nov 17, 2016 · 4 comments

Comments

@llicht
Copy link

llicht commented Nov 17, 2016

I'm submitting a feature request

  • Library Version:
    1.0.0-beta.2.0.0

Please tell us about your environment:

  • Language:
    Typescript 2

Current behavior:

  1. StageComponent is of type any, which means the typings of ComponentTester aren't taken advantage of when StageComponent is used.
  2. If you workaround (1), you'll find that doing "component.create (bootstrap)" like the documentation suggests fails typescript's type-check since ComponentTester.create expects a function that takes an Aurelia object while bootstrap is a function that takes a Function.

Expected/desired behavior:
It would be better if StageComponent & ComponentTester had full & correct typings under typescript.

@EisenbergEffect
Copy link
Contributor

Would you be interested in submitting a PR to fix the types in the code?

@llicht
Copy link
Author

llicht commented Nov 21, 2016

I'll keep that in mind, but I likely won't be able to.

@s-hoff
Copy link
Contributor

s-hoff commented Dec 30, 2016

@llicht any updates, are you still on to this?

@llicht
Copy link
Author

llicht commented Jan 2, 2017

No, I'm not working on this currently, feel free to submit the PR.

s-hoff added a commit to s-hoff/testing that referenced this issue Jan 3, 2017
s-hoff added a commit to s-hoff/testing that referenced this issue Jan 3, 2017
Turned StageComponent into a class with static functions as TypeScript would turn the JSON const to `any`.
Fixes aurelia#46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants