-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Labels
DocsThe issue relates to how you learn TypeScriptThe issue relates to how you learn TypeScriptDomain: Node ESMLike ES Modules, but specific to Node.js support (cts, cts, mjs, mts)Like ES Modules, but specific to Node.js support (cts, cts, mjs, mts)
Description
Bug Report
π Search Terms
- moduleResolution
- NodeNext
- module
- mts
π Version & Regression Information
- This changed between versions
4.6.4
and4.7.2
as a result of the new"moduleResolution": "NodeNext"
setting I have also tested innightly
β― Playground Link
Playground link with relevant code
π» Code
import is from '@sindresorhus/is';
is.nullOrUndefined('something');
// => Property 'nullOrUndefined' does not exist on type 'typeof import("file:///node_modules/@sindresorhus/is/dist/index")
is.emptyObject({});
// => Property 'emptyObject' does not exist on type 'typeof import("file:///node_modules/@sindresorhus/is/dist/index")'.
π§ Settings
{
"compilerOptions": {
"module": "ESNext",
"target": "ESNext",
"moduleResolution": "NodeNext", // This is the change that caused the issue.
"jsx": "preserve",
"lib": ["DOM", "ESNext"],
"noImplicitReturns": true,
"sourceMap": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"noFallthroughCasesInSwitch": true,
"forceConsistentCasingInFileNames": true,
"allowUnreachableCode": false,
"strict": true,
"resolveJsonModule": true,
"useDefineForClassFields": true,
"importsNotUsedAsValues": "remove",
"noUncheckedIndexedAccess": true,
"noImplicitOverride": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"pretty": true
}
}
π Actual behavior
Importing from this module which exports the namespace is
as its default export doesn't recognize any of the properties within the namespace.
π Expected behavior
It should allow for access to the members of the namespace.
lo1tuma and screendriver
Metadata
Metadata
Assignees
Labels
DocsThe issue relates to how you learn TypeScriptThe issue relates to how you learn TypeScriptDomain: Node ESMLike ES Modules, but specific to Node.js support (cts, cts, mjs, mts)Like ES Modules, but specific to Node.js support (cts, cts, mjs, mts)