File: moduleResolutionWithoutExtension5.errors.txt

package info (click to toggle)
node-typescript 5.0.4%2Bds1-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 459,116 kB
  • sloc: javascript: 1,972,754; makefile: 6; sh: 1
file content (13 lines) | stat: -rw-r--r-- 1,136 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
error TS2468: Cannot find global value 'Promise'.
/src/buzz.mts(2,1): error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor.  Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option.
/src/buzz.mts(2,8): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path.


!!! error TS2468: Cannot find global value 'Promise'.
==== /src/buzz.mts (2 errors) ====
    // Extensionless relative path dynamic import in an ES module
    import("./foo").then(x => x); // should error, ask for extension
    ~~~~~~~~~~~~~~~
!!! error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor.  Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option.
           ~~~~~~~
!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path.