Skip to content

descriptinc/temporal-polyfill-bug

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Demonstration of CommonJS/ESM interop bug

$ pnpm run typecheck

> [email protected] typecheck /src/temporal-polyfill-bug
> tsc --build tsconfig.json

index.ts:1:26 - error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("temporal-polyfill")' call instead.
  To convert this file to an ECMAScript module, change its file extension to '.mts', or add the field `"type": "module"` to '/src/temporal-polyfill-bug/package.json'.

1 import { Temporal } from 'temporal-polyfill';
                           ~~~~~~~~~~~~~~~~~~~


Found 1 error.

 ELIFECYCLE  Command failed with exit code 1.

About

Demonstration of Typescript bug

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published