Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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

Copy link
Copy link
@PassionPenguin

Description

@PassionPenguin
Issue body actions

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]

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.