You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
create project in typescript that uses antd components.
dont set the "allowSyntheticDefaultImports" flag in tsconfig.json.
node_modules/rc-notification/lib/Notice.d.ts:1:8 - error TS1259: Module '"/home/pdeva/code/dashboard/node_modules/@types/react/index"' can only be default-imported using the 'allowSyntheticDefaultImports' flag
1 import React, { Component } from 'react';
~~~~~
node_modules/@types/react/index.d.ts:65:1
65 export = React;
~~~~~~~~~~~~~~~
This module is declared with using 'export =', and can only be used with a default import when using the 'allowSyntheticDefaultImports' flag.
node_modules/rc-notification/lib/Notification.d.ts:1:8 - error TS1259: Module '"/home/pdeva/code/dashboard/node_modules/@types/react/index"' can only be default-imported using the 'allowSyntheticDefaultImports' flag
1 import React, { Component, ReactText } from 'react';
~~~~~
node_modules/@types/react/index.d.ts:65:1
65 export = React;
~~~~~~~~~~~~~~~
This module is declared with using 'export =', and can only be used with a default import when using the 'allowSyntheticDefaultImports' flag.
node_modules/rc-tree-select/lib/TreeNode.d.ts:1:8 - error TS1259: Module '"/home/pdeva/code/dashboard/node_modules/@types/react/index"' can only be default-imported using the 'allowSyntheticDefaultImports' flag
1 import React from 'react';
~~~~~
node_modules/@types/react/index.d.ts:65:1
65 export = React;
~~~~~~~~~~~~~~~
This module is declared with using 'export =', and can only be used with a default import when using the 'allowSyntheticDefaultImports' flag.
node_modules/rc-tree-select/lib/interface.d.ts:1:8 - error TS1259: Module '"/home/pdeva/code/dashboard/node_modules/@types/react/index"' can only be default-imported using the 'allowSyntheticDefaultImports' flag
1 import React from 'react';
~~~~~
node_modules/@types/react/index.d.ts:65:1
65 export = React;
~~~~~~~~~~~~~~~
This module is declared with using 'export =', and can only be used with a default import when using the 'allowSyntheticDefaultImports' flag.
node_modules/rc-trigger/lib/index.d.ts:1:8 - error TS1259: Module '"/home/pdeva/code/dashboard/node_modules/@types/react/index"' can only be default-imported using the 'allowSyntheticDefaultImports' flag
1 import React from 'react';
~~~~~
node_modules/@types/react/index.d.ts:65:1
65 export = React;
~~~~~~~~~~~~~~~
This module is declared with using 'export =', and can only be used with a default import when using the 'allowSyntheticDefaultImports' flag.
src/widgets/common/selectableFilterSet.tsx:4:8 - error TS1259: Module '"/home/pdeva/code/dashboard/node_modules/@types/lodash/index"' can only be default-imported using the 'allowSyntheticDefaultImports' flag
4 import _ from "lodash";
~
node_modules/@types/lodash/index.d.ts:27:1
27 export = _;
~~~~~~~~~~~
This module is declared with using 'export =', and can only be used with a default import when using the 'allowSyntheticDefaultImports' flag.
src/widgets/common/selectableFilterSet.tsx:15:55 - error TS7006: Parameter 'f' implicitly has an 'any' type.
15 const sortedFilters = _.sortBy(props.allFilters, [f => f.key]);
~
Found 7 errors.
What is expected?
code should compile without errors.
this was reported in #26484 also
What is actually happening?
compiler errors
Environment
Info
antd
4.7.3
React
16.14.0
System
Ubuntu 20.04
Browser
Chrome 86
The text was updated successfully, but these errors were encountered:
Reproduction link
#26484
Steps to reproduce
create project in typescript that uses antd components.
dont set the "allowSyntheticDefaultImports" flag in tsconfig.json.
What is expected?
code should compile without errors.
this was reported in #26484 also
What is actually happening?
compiler errors
The text was updated successfully, but these errors were encountered: