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

Fabric: Fixed the return-type of the IIntersectionStatic constructor #13804

Closed
wants to merge 1 commit into from

Conversation

webbiesdk
Copy link
Contributor

Having a constructor return "void" never makes sense, since a function called with "new" will always return something different from void.

Please fill in this template.

  • Make your PR against the master branch.
  • Use a meaningful title for the pull request. Include the name of the package modified.
  • Test the change in your own code. (Compile and run.)
  • Follow the advice from the readme.
  • Avoid common mistakes.
  • Run tsc without errors.
  • Run npm run lint package-name if a tslint.json is present.

If changing an existing definition:

  • Provide a URL to documentation or source code which provides context for the suggested changes:
  • Increase the version number in the header if appropriate.
  • If you are making substantial changes, consider adding a tslint.json containing { "extends": "../tslint.json" }.

Having a constructor return "void" never makes sense, since a function called with "new" will always return something different from void.
@dt-bot
Copy link
Member

dt-bot commented Jan 6, 2017

fabric/index.d.ts

to authors (@oklemencic @joewashear007 @mrand01). Could you review this PR?
👍 or 👎?

Checklist

  • pass the Travis CI test?

@ghost
Copy link

ghost commented Jan 7, 2017

A better solution would be to have class Intersection, ditch IIntersectionStatic, and add a constructor and static methods to Intersection.

@webbiesdk
Copy link
Contributor Author

Yes it would (I did read that part of your FAQ), but i decided to change as little as possible, and just correct the error that i found, instead of doing a major refactorization.

Also, as long as this issue is open: microsoft/TypeScript#819, there can be a legitimate reason for using interfaces instead of class declaratons.

And I don't know enough about Fabric to determine why they are using interfaces instead of class declaration, and I don't want to break things.

So yes, it would perhaps be better, but no, I won't do it.

@ghost
Copy link

ghost commented Jan 7, 2017

Done in #13833

@ghost ghost closed this Jan 7, 2017
@webbiesdk webbiesdk deleted the patch-1 branch January 7, 2017 21:33
This pull request was closed.
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

3 participants