-
Notifications
You must be signed in to change notification settings - Fork 13.3k
The import attributes should be preserved in .d.ts. #60736
Copy link
Copy link
Closed as not planned
Labels
Not a DefectThis behavior is one of several equally-correct optionsThis behavior is one of several equally-correct options
Description
🔎 Search Terms
"import attributes", "import assert", "import with"
🕗 Version & Regression Information
- This changed between versions 4.0 and latest
- This changed in commit or PR _______
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about _________
- I was unable to test this on prior versions because _______
⏯ Playground Link
💻 Code
export { useState } from 'react' with { 'resolution-mode': 'module' }
export const { useCallback } = await import('react', { with: { 'resolution-mode': 'require' } })🙁 Actual behavior
.d.ts
export { useState } from 'react';
export declare const useCallback: typeof import("react").useCallback;🙂 Expected behavior
.d.ts
export { useState } from 'react' with { 'resolution-mode': 'module' };
export declare const useCallback: typeof import("react", { with: { 'resolution-mode': 'require' } }).useCallback;
Additional information about the issue
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Not a DefectThis behavior is one of several equally-correct optionsThis behavior is one of several equally-correct options