- Notifications
You must be signed in to change notification settings - Fork664
Open
Description
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.