Skip to content

Commit

Permalink
@sentry/react-native libdef: Make object types exact or explicitly in…
Browse files Browse the repository at this point in the history
…exact.

An instance of zulip#3452.
  • Loading branch information
chrisbobbe committed Jun 30, 2021
1 parent 0df179e commit b9d2725
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions flow-typed/@sentry/react-native_v2.x.x.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ declare module '@sentry/react-native' {
//
// Flow doesn't support true enums, so we split the TypeScript `enum Severity`
// into a separate variable `Severity` and type `SeverityType`.
declare export var Severity: $ReadOnly<{
declare export var Severity: $ReadOnly<{|
Fatal: 'fatal',
Error: 'error',
Warning: 'warning',
Log: 'log',
Info: 'info',
Debug: 'debug',
Critical: 'critical',
}>;
|}>;
declare export type SeverityType = $Values<typeof Severity>;

// Taken from @sentry/types/src/event.ts.
Expand Down Expand Up @@ -110,6 +110,7 @@ declare module '@sentry/react-native' {

captureException(exception: mixed, hint?: EventHint): string,
captureMessage(message: string, level?: SeverityType, hint?: EventHint): string,
...
};

// Taken from @sentry/{minimal,types}/src/scope.ts.
Expand Down Expand Up @@ -147,6 +148,7 @@ declare module '@sentry/react-native' {
// Adapted from @sentry/types/src/client.ts, with some specialization.
declare export type Client = {
getOptions(): Options,
...
};

// Adapted from @sentry/react-native/src/sdk.ts.
Expand Down

0 comments on commit b9d2725

Please sign in to comment.