Skip to content

Commit acff1c5

Browse files
committed
make API properties more explicit (for type-checking)
1 parent 777aa9d commit acff1c5

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

packages/core/src/api.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,20 @@ const SENTRY_API_VERSION = '7';
99
* Supports both envelopes and regular event requests.
1010
**/
1111
export class API {
12+
/** The DSN as passed to Sentry.init() */
13+
public dsn: DsnLike;
14+
15+
/** Metadata about the SDK (name, version, etc) for inclusion in envelope headers */
16+
public metadata: SdkMetadata;
17+
1218
/** The internally used Dsn object. */
1319
private readonly _dsnObject: Dsn;
20+
1421
/** Create a new instance of API */
15-
public constructor(public dsn: DsnLike, public metadata: SdkMetadata = {}) {
22+
public constructor(dsn: DsnLike, metadata: SdkMetadata = {}) {
23+
this.dsn = dsn;
1624
this._dsnObject = new Dsn(dsn);
25+
this.metadata = metadata;
1726
}
1827

1928
/** Returns the Dsn object. */

0 commit comments

Comments
 (0)