-
Couldn't load subscription status.
- Fork 13.1k
Closed
Labels
ExternalRelates to another program, environment, or user action which we cannot control.Relates to another program, environment, or user action which we cannot control.
Milestone
Description
Bug Report
π Search Terms
class, not constructable, has no construct signatures
π Version & Regression Information
- I was unable to test this on prior versions because it's related to
nodenextmodule
β― Playground Link
Playground link with relevant code
Change Module configuration to NodeNext to reproduce errors.
π» Code
import ESLintPlugin from 'eslint-webpack-plugin';
const plugin = new ESLintPlugin();π Actual behavior
This simple code inside a "type": "module" package with tsconfig.json declaraing "module": "nodenext", "moduleResolution": "nodenext" can result in type errors:
import ESLintPlugin
This expression is not constructable.
Type 'typeof import("/Users/otakustay/Downloads/s/node_modules/eslint-webpack-plugin/declarations/index")' has no construct signatures.ts(2351)
π Expected behavior
Since TypeScript already resolves type definition to correct .d.ts, and this type definition seems correct:
export default ESLintWebpackPlugin;
export type Compiler = import('webpack').Compiler;
export type Options = import('./options').Options;
declare class ESLintWebpackPlugin {
// ...
}This code should compile as expected.
Pinpickle
Metadata
Metadata
Assignees
Labels
ExternalRelates to another program, environment, or user action which we cannot control.Relates to another program, environment, or user action which we cannot control.