Files
tsgo/testdata/baselines/reference/submoduleAccepted/compiler/elidedJSImport1.errors.txt.diff

18 lines
1.7 KiB
Diff

--- old.elidedJSImport1.errors.txt
+++ new.elidedJSImport1.errors.txt
@@= skipped -0, +0 lines =@@
caller.js(1,21): error TS2591: Cannot find name 'fs'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig.
-caller.js(2,8): error TS18042: 'TruffleContract' is a type and cannot be imported in JavaScript files. Use 'import("@truffle/contract").TruffleContract' in a JSDoc type annotation.
+caller.js(2,8): error TS18042: 'TruffleContract' is a type and cannot be imported in JavaScript files. Use 'import("@truffle/contract")' in a JSDoc type annotation.
caller.js(4,43): error TS2708: Cannot use namespace 'TruffleContract' as a value.
caller.js(4,60): error TS2708: Cannot use namespace 'TruffleContract' as a value.
@@= skipped -9, +9 lines =@@
!!! error TS2591: Cannot find name 'fs'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig.
import TruffleContract from '@truffle/contract'; // Runtime err: this import is elided in transform
~~~~~~~~~~~~~~~
-!!! error TS18042: 'TruffleContract' is a type and cannot be imported in JavaScript files. Use 'import("@truffle/contract").TruffleContract' in a JSDoc type annotation.
+!!! error TS18042: 'TruffleContract' is a type and cannot be imported in JavaScript files. Use 'import("@truffle/contract")' in a JSDoc type annotation.
console.log(fs);
console.log('TruffleContract is ', typeof TruffleContract, TruffleContract); // `TruffleContract` is considered 'unused'
~~~~~~~~~~~~~~~