I am getting the following typescrit/tslint erros when trying to use version 4.21.7 of ant design within my Power BI custom visual:
ERROR in /node_modules/antd/lib/input/Input.d.ts
[tsl] ERROR in /node_modules/antd/lib/input/Input.d.ts(17,11)
TS1110: Type expected.
ERROR in /node_modules/antd/lib/input/Input.d.ts
[tsl] ERROR in /node_modules/antd/lib/input/Input.d.ts(17,27)
TS1005: ';' expected.
ERROR in /node_modules/antd/lib/input/Input.d.ts
[tsl] ERROR in /node_modules/antd/lib/input/Input.d.ts(17,28)
TS1128: Declaration or statement expected.
ERROR in /node_modules/antd/lib/input/Input.d.ts
[tsl] ERROR in /node_modules/antd/lib/input/Input.d.ts(18,1)
TS1128: Declaration or statement expected.
The code it is referencing to is the following, line 17 is ([key: data-${string}
]: string;):
export interface InputProps extends Omit<RcInputProps, 'wrapperClassName' | 'groupClassName' | 'inputClassName' | 'affixWrapperClassName'> {
size?: SizeType;
disabled?: boolean;
status?: InputStatus;
bordered?: boolean;
[key: `data-${string}`]: string;
}
My tslint.json looks like this, what am I missing?
{
"extends": "tslint-microsoft-contrib/recommended",
"rulesDirectory": [
"node_modules/tslint-microsoft-contrib"
],
"rules": {
"no-relative-imports": false
}
}
I faced similar issue and I upgraded the typescript in my package to 4.7.4 (latest version) and it worked
"typescript": "^4.7.4"
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.