Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Broken type import from@sendgrid/mail #1380

Open
Labels
Domain: Module ResolutionRelated to module resolution and module checker errorsDomain: Type CheckingRelated to type checking, grammar checking
@controversial

Description

@controversial

Compiling the following import statement:

import{MailDataRequired}from'@sendgrid/mail';

compiles without error usingtsc, but the latesttsgo fails to resolve the import:

node_modules/@sendgrid/mail/src/mail.d.ts:1:9 - error TS2596: 'Client' can only be imported by turning on the 'esModuleInterop' flag and using a default import.1 import {Client} from "@sendgrid/client";          ~~~~~~test.ts:1:10 - error TS2305: Module '"@sendgrid/mail"' has no exported member 'MailDataRequired'.1 import { MailDataRequired } from '@sendgrid/mail';           ~~~~~~~~~~~~~~~~Found 2 errors in 2 files.Errors  Files     1  node_modules/@sendgrid/mail/src/mail.d.ts:1     1  test.ts:1

This reproduces in a blank project with onlytypescript,@typescript/native-preview, and@sendgrid/mail installed.

Using the following minimal, modern tsconfig (not using any ancient or to-be-deprecated module resolution settings):

{"compilerOptions": {"target":"es2023","module":"esnext","moduleResolution":"bundler","noEmit":true,  },"include": ["**/*.ts"],"exclude": ["**/node_modules"]}

also reproduces withmodule: preserve,module: node16 and other common module settings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Domain: Module ResolutionRelated to module resolution and module checker errorsDomain: Type CheckingRelated to type checking, grammar checking

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp