Skip to content

Commit

Permalink
Merge pull request #817 from bugsnag/type-expo-api-key-optional
Browse files Browse the repository at this point in the history
fix(expo): Ensure types allow start() can be called with no arguments
  • Loading branch information
bengourley committed Apr 24, 2020
2 parents 76cf9c7 + e1ecae2 commit d1daac5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
- (plugin-vue): Fix plugin type definitions [#809](https://github.com/bugsnag/bugsnag-js/pull/809)
- (delivery-expo): Ensure Expo delivery logs event details correctly (instead of `undefined`) [#804](https://github.com/bugsnag/bugsnag-js/pull/804)
- (expo-cli): Ensure Expo cli inserts correct code depending on the version of the notifier [#808](https://github.com/bugsnag/bugsnag-js/pull/808)
- (expo): Ensure types allow `.start()` with no arguments [#817](https://github.com/bugsnag/bugsnag-js/pull/817)

## 7.0.0 (2020-04-14)

Expand Down
7 changes: 5 additions & 2 deletions packages/expo/types/bugsnag.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import { BugsnagStatic } from '@bugsnag/core'
import { BugsnagStatic, Config, Client } from '@bugsnag/core'

declare const Bugsnag: BugsnagStatic
interface ExpoBugsnagStatic extends BugsnagStatic {
start(apiKeyOrOpts?: string | Config): Client
}
declare const Bugsnag: ExpoBugsnagStatic

export default Bugsnag
export * from '@bugsnag/core'
2 changes: 2 additions & 0 deletions packages/expo/types/test/fixtures/all-options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,5 @@ Bugsnag.start({
logger: undefined,
redactedKeys: ["foo",/bar/]
})

Bugsnag.start()

0 comments on commit d1daac5

Please sign in to comment.