-
-
Notifications
You must be signed in to change notification settings - Fork 258
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
Publish Types? #877
Comments
regarding the Smth like: import { TestContext as DefaultTestContext } from 'ember-test-helpers';
import { Something } from 'somewhere';
export interface TestContext extends DefaultTestContext {
something: Something
}
module('my-module', funtion(hooks) {
test('something', function(this: TestContext, assert) {
this.owner.register('...');
this.something = new Something();
// ...
});
}) |
First off, I would ABSOLUTELY LOVE to publish types, but frankly there are too many issues that are a bit uncharted with regards to providing TS types at the moment. The work that @chriskrycho is doing over in typed-ember/ember-cli-typescript#1158 is the right path forward for us here, and once that lands we can discuss an Ember RFC to move things forward in official Ember repos. Tldr; types will not be published by this package until we have figured out how to deal with the lack of ecosystem commitment to SemVer in the TypeScript space. |
maybe the TS v4 series will introduce semver ❤️ |
This can be closed? |
sure can! |
the types over at
@types/ember__test-helpers
are a little wrong, and as with all separate types packages can be prone to fall out of sync -- not that ember-test-helpers has changed much recently.Specifically,
getContext()
on@types/ember__test-helpers
only returns an object, leading to type errors like this:I've opened a PR here: DefinitelyTyped/DefinitelyTyped#45281
but I doubt it'll get merged, because
This repo already has the types. I understand TS fragility, but even if separate type declarations were in this repo, that'd be a huge improvement.
The text was updated successfully, but these errors were encountered: