Typescript definition is error TS2714
See original GitHub issueI have problem with typescript definition in your lib/index.d.ts
I also tried to import with this way But it throws the same error.
import { Result } from 'ant-design-pro';
The error is
/home/romsy/Code/Projects/lumpang/office/node_modules/ant-design-pro/lib/index.d.ts
(21,16): error TS2714: The expression of an export assignment must be an identifier or qualified name in an ambient context.
I think the error is coming from your type definition. Here’s I inspect into your type def.
Here’s my tsconfig.json
config
{
"compilerOptions": {
"outDir": "build/dist",
"module": "esnext",
"target": "es5",
"lib": ["es6", "dom"],
"sourceMap": true,
"allowJs": true,
"jsx": "react",
"moduleResolution": "node",
"rootDir": "src",
"forceConsistentCasingInFileNames": true,
"noImplicitReturns": false,
"noImplicitThis": false,
"noImplicitAny": false,
"strictNullChecks": false,
"suppressImplicitAnyIndexErrors": true,
"noUnusedLocals": true,
"experimentalDecorators": true,
"allowSyntheticDefaultImports": true,
"typeRoots": ["./node_modules/@types", "./typings"],
"baseUrl": "src",
"paths": {
"~/*": ["*"]
}
},
"include": ["./src/**/*", "./typings"],
"exclude": [
"node_modules",
"build",
"scripts",
"acceptance-tests",
"webpack",
"jest",
"src/setupTests.ts"
]
}
Any solution will be apreciated. Thanks
Issue Analytics
- State:
- Created 5 years ago
- Comments:7
Top Results From Across the Web
Error TS2714 with TypeScript definition file · Issue #27 - GitHub
This error does not occur in using version 1.1.0. We're using TypeScript 2.8.3. C:/Work/Journeys/radar/client/node_modules/http-status/lib/index ...
Read more >Typescript (at-loader) compiler errors in WebPack
ERROR in [at-loader] ./node_modules/uri-js/src/punycode.d.ts:9:17 TS2714: The expression of an export assignment must be an identifier or ...
Read more >ts-custom-error - npm
ts-custom-error is a tiny (~500 bytes of minified & gzipped Javascript) package providing a CustomError class and a customErrorFactory function ...
Read more >Documentation - TypeScript 2.6
The first assignment is now an error. Effectively, T is contravariant in Comparer<T> because it is used only in function type parameter positions....
Read more >TypeScript errors and how to fix them
A list of common TypeScript errors and how to fix them.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
i will fixed in new version
Moved to https://github.com/ant-design/ant-design-pro-site/issues/229