fixes for TypeScript 5.0

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2023-03-25 15:30:22 +01:00
parent cc0e135cb9
commit 2898b6c8d5
22 changed files with 72 additions and 45 deletions
@@ -104,7 +104,7 @@ export class RollbarApi {
);
}
private async get<T>(url: string, accessToken?: string) {
private async get<T extends {}>(url: string, accessToken?: string) {
const fullUrl = buildUrl(url);
if (this.logger) {
@@ -119,7 +119,7 @@ export class RollbarApi {
.then(json => camelcaseKeys<T>(json?.result, { deep: true }));
}
private async getForProject<T>(
private async getForProject<T extends {}>(
url: string,
projectName: string,
useProjectToken = true,