TS1205 Re-exporting in /src/authentication/azureTokenCredentials/index.ts:7:10

Ouverte
#1,535 4 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Évaluation

Difficulté
1/5
Temps estimé
Moins d'une heure
Accessibilité débutants
48/100
Type d'issue
Bug
Clarté
Clairement spécifiée
Activité
À l'abandon
Stack technique
azure, typescript
Domaine
authentication

Piste de recherche

Start at src/authentication/azureTokenCredentials/index.ts:7 and inspect the related type declaration in ITokenCredentialAuthenticationProviderOptions. Run npm run build with isolatedModules enabled and confirm the package builds without the TS1205 error.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

Bug Report

Prerequisites

  • Can you reproduce the problem?
  • Are you running the latest version?
  • Are you reporting to the correct repository?
  • Did you perform a cursory search?

For more information, see the CONTRIBUTING guide.

Description

/src/authentication/azureTokenCredentials/index.ts:7:10

Console Errors: no

Screenshots:

Screenshot 2023-11-16 at 10 56 10 PM

Steps to Reproduce

import {Client, ClientOptions} from "@microsoft/microsoft-graph-client";
import {
    TokenCredentialAuthenticationProvider
} from "@microsoft/microsoft-graph-client/src/authentication/azureTokenCredentials";
import {ClientSecretCredential} from "@azure/identity";

export class MSGraphClient {
    public static client: Client;

    public static init() {
        const tenantID = process.env.MSGRAPH_TENANT_ID,
            clientID = process.env.MSGRAPH_CLIENT_ID,
            clientSecret = process.env.MSGRAPH_CLIENT_SECRET;
        let clientOptions: ClientOptions = {
            authProvider: new TokenCredentialAuthenticationProvider(
                new ClientSecretCredential(tenantID, clientID, clientSecret),
                {scopes: ["https://graph.microsoft.com/.default"]}
            ),
        };
        MSGraphClient.client = Client.initWithMiddleware(clientOptions);
    }
}

Expected behavior: no throw

Actual behavior: throw:

./node_modules/@microsoft/microsoft-graph-client/src/authentication/azureTokenCredentials/index.ts:7:10
Type error: Re-exporting a type when 'isolatedModules' is enabled requires using 'export type'.
  5 |  * -------------------------------------------------------------------------------------------
  6 |  */
> 7 | export { TokenCredentialAuthenticationProviderOptions } from "./ITokenCredentialAuthenticationProviderOptions";
    |          ^
  8 | export { TokenCredentialAuthenticationProvider } from "./TokenCredentialAuthenticationProvider";
  9 |
Error: Command "npm run build" exited with 1

Additional Context

running both on vercel and locally throws

Usage Information

Request ID - N/A

SDK Version - [SDK version you are using]

  • Node (Check, if using Node version of SDK)

Node Version - 21.1.0

  • Browser any

Browser Name - [The name of Browser that you are using for SDK]

Version - [The version of the browser you are using]

Langage dominant
TypeScript
Étoiles
833
Forks
240
Métriques de merge des PR
Aucune PR mergée en 30 j

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de microsoftgraph/msgraph-sdk-javascript

Toutes les issues de microsoftgraph/msgraph-sdk-javascript

Issues similaires

Plus d'issues TypeScript

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.