ERROR in src/assets/datafeeds/udf/src/udf-compatible-datafeed-base.ts(243,74): error TS2339: Property 'errmsg' does not exist on type 'UdfErrorResponse | UdfSearchSymbolsResponse'.
  Property 'errmsg' does not exist on type 'UdfSearchSymbolsResponse'.
src/assets/datafeeds/udf/src/udf-compatible-datafeed-base.ts(248,15): error TS2345: Argument of type 'UdfErrorResponse | UdfSearchSymbolsResponse' is not assignable to parameter of type 'SearchSymbolResultItem[]'.
  Type 'UdfErrorResponse' is not assignable to type 'SearchSymbolResultItem[]'.
    Property 'length' is missing in type 'UdfErrorResponse'.
src/assets/datafeeds/udf/src/udf-compatible-datafeed-base.ts(284,21): error TS2345: Argument of type 'UdfErrorResponse | ResolveSymbolResponse' is not assignable to parameter of type 'LibrarySymbolInfo'.
  Type 'UdfErrorResponse' is not assignable to type 'LibrarySymbolInfo'.
    Property 'name' is missing in type 'UdfErrorResponse'.

最佳答案

在tsconfig.app.json中将assets/datafeeds/udf/src添加到exlude

例如:

{
  "extends": "../tsconfig.json",
  "compilerOptions": {
    "outDir": "../out-tsc/app",
    "module": "es2015",
    "types": []
  },
  "exclude": [
    "src/test.ts",
    "**/*.spec.ts",
    "assets/datafeeds/udf/src"
  ]
}

关于javascript - 在angular 7项目中嵌入交易图表库时出错,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/54210426/

10-09 16:43