|
| 1 | +/index.ts(7,7): error TS2322: Type '{ default: { configs: { 'stage-0': PluginConfig; }; }; configs: { 'stage-0': PluginConfig; }; }' is not assignable to type 'Plugin'. |
| 2 | + Types of property 'configs' are incompatible. |
| 3 | + Type '{ 'stage-0': PluginConfig; }' is not assignable to type 'Record<string, { parser: string | null; }>'. |
| 4 | + Property ''stage-0'' is incompatible with index signature. |
| 5 | + Type 'PluginConfig' is not assignable to type '{ parser: string | null; }'. |
| 6 | + Types of property 'parser' are incompatible. |
| 7 | + Type 'string | null | undefined' is not assignable to type 'string | null'. |
| 8 | + Type 'undefined' is not assignable to type 'string | null'. |
| 9 | + |
| 10 | + |
| 11 | +==== /node_modules/eslint-plugin-import-x/package.json (0 errors) ==== |
| 12 | + { |
| 13 | + "name": "eslint-plugin-import-x", |
| 14 | + "version": "1.0.0", |
| 15 | + "main": "index.cjs" |
| 16 | + } |
| 17 | + |
| 18 | +==== /node_modules/eslint-plugin-import-x/index.d.cts (0 errors) ==== |
| 19 | + declare const eslintPluginImportX: typeof import("./lib/index.js"); |
| 20 | + export = eslintPluginImportX; |
| 21 | + |
| 22 | +==== /node_modules/eslint-plugin-import-x/lib/index.d.ts (0 errors) ==== |
| 23 | + interface PluginConfig { |
| 24 | + parser?: string | null; |
| 25 | + } |
| 26 | + declare const configs: { |
| 27 | + 'stage-0': PluginConfig; |
| 28 | + }; |
| 29 | + declare const _default: { |
| 30 | + configs: { |
| 31 | + 'stage-0': PluginConfig; |
| 32 | + }; |
| 33 | + }; |
| 34 | + export default _default; |
| 35 | + export { configs }; |
| 36 | + |
| 37 | +==== /index.ts (1 errors) ==== |
| 38 | + import * as pluginImportX from 'eslint-plugin-import-x' |
| 39 | + |
| 40 | + interface Plugin { |
| 41 | + configs?: Record<string, { parser: string | null }> |
| 42 | + } |
| 43 | + |
| 44 | + const p: Plugin = pluginImportX; |
| 45 | + ~ |
| 46 | +!!! error TS2322: Type '{ default: { configs: { 'stage-0': PluginConfig; }; }; configs: { 'stage-0': PluginConfig; }; }' is not assignable to type 'Plugin'. |
| 47 | +!!! error TS2322: Types of property 'configs' are incompatible. |
| 48 | +!!! error TS2322: Type '{ 'stage-0': PluginConfig; }' is not assignable to type 'Record<string, { parser: string | null; }>'. |
| 49 | +!!! error TS2322: Property ''stage-0'' is incompatible with index signature. |
| 50 | +!!! error TS2322: Type 'PluginConfig' is not assignable to type '{ parser: string | null; }'. |
| 51 | +!!! error TS2322: Types of property 'parser' are incompatible. |
| 52 | +!!! error TS2322: Type 'string | null | undefined' is not assignable to type 'string | null'. |
| 53 | +!!! error TS2322: Type 'undefined' is not assignable to type 'string | null'. |
| 54 | + |
0 commit comments