Skip to content

Conversation

@GabrielCousin
Copy link
Contributor

@GabrielCousin GabrielCousin commented Jul 13, 2021

Hey there,

Thank you for the hard work fixing the types publications with the Ember addon.
While testing 6.9.0, I found a new bug which was (I think) easy to address, so here is a PR for this.

// in app/app.ts
import Application from '@ember/application';
import Resolver from 'ember-resolver';
import loadInitializers from 'ember-load-initializers';
import config from 'search/config/environment';
import { InitSentryForEmber } from '@sentry/ember';

InitSentryForEmber();

export default class App extends Application {
// ...
}

TypeScript is reporting the following error:

app/app.ts:7:1 - error TS2554: Expected 1 arguments, but got 0.

7 InitSentryForEmber();
  ~~~~~~~~~~~~~~~~~~~~

node_modules/@sentry/ember/index.d.ts:5:44
    5 export declare function InitSentryForEmber(_runtimeConfig: BrowserOptions | undefined): void;
                                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
An argument for '_runtimeConfig' was not provided.

Found 1 error.

The other option is to explicitly pass undefined as the first argument.
Let me know if there is anything else I can help with!

@kamilogorek kamilogorek enabled auto-merge (squash) July 13, 2021 13:38
@kamilogorek kamilogorek disabled auto-merge July 13, 2021 13:38
@kamilogorek kamilogorek enabled auto-merge (squash) July 13, 2021 13:39
@kamilogorek
Copy link
Contributor

Thanks

@AbhiPrasad AbhiPrasad requested a review from k-fish July 13, 2021 15:14
Copy link
Member

@k-fish k-fish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, missed that optional, thanks for the PR 👍

@kamilogorek kamilogorek merged commit 778ad8b into getsentry:master Jul 13, 2021
@GabrielCousin GabrielCousin deleted the patch-1 branch July 20, 2021 13:15
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.

3 participants