本文介绍了angular 6 升级后出现很多智能感知错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

升级到 angular 6 后,我的 Visual Studio 2017 错误列表窗口中有大约 80 条错误.这些错误仅出现在 VS 中,因为命令行中的 ng serve 编译正常并且应用程序运行正常.

I have about 80ish errors in my visual studio 2017 error list window after upgrading to angular 6. Those errors only appear in VS as ng serve in command line compiles fine and the application works fine.

Severity    Code    Description Project File    Line    Suppression State
Error   TS2339  (TS) Property 'length' does not exist on type '{}'. C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\src\app\components\pollution\pollution.component.ts   101 Active
Error   TS2415  (TS) Class 'FocusKeyManager<T>' incorrectly extends base class 'ListKeyManager<FocusableOption & T>'.
  Types of property 'setActiveItem' are incompatible.
    Type '(index: number) => void' is not assignable to type '{ (index: number): void; (item: FocusableOption & T): void; }'.
      Types of parameters 'index' and 'item' are incompatible.
        Type 'FocusableOption & T' is not assignable to type 'number'.  C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\node_modules\@angular\cdk\a11y\typings\key-manager\focus-key-manager.d.ts 19  Active
Error   TS2305  (TS) Module '"C:/Users/anon/Documents/Projects/EEA.Projects/DEP/MassAir/Web/node_modules/rxjs/Observable"' has no exported member 'Observable'. C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\node_modules\@angular\cdk\collections\typings\data-source.d.ts    8   Active
Error   TS2305  (TS) Module '"C:/Users/anon/Documents/Projects/EEA.Projects/DEP/MassAir/Web/node_modules/rxjs/Subject"' has no exported member 'Subject'.   C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\node_modules\@angular\cdk\collections\typings\selection.d.ts  8   Active
Error   TS2305  (TS) Module '"C:/Users/anon/Documents/Projects/EEA.Projects/DEP/MassAir/Web/node_modules/rxjs/Observable"' has no exported member 'Observable'. C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\node_modules\@angular\cdk\layout\typings\breakpoints-observer.d.ts    10  Active
Error   TS2305  (TS) Module '"C:/Users/anon/Documents/Projects/EEA.Projects/DEP/MassAir/Web/node_modules/rxjs/Observable"' has no exported member 'Observable'. C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\node_modules\@angular\cdk\overlay\typings\overlay-ref.d.ts    11  Active
Error   TS2305  (TS) Module '"C:/Users/anon/Documents/Projects/EEA.Projects/DEP/MassAir/Web/node_modules/rxjs/Subject"' has no exported member 'Subject'.   C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\node_modules\@angular\cdk\overlay\typings\overlay-ref.d.ts    12  Active
Error   TS2305  (TS) Module '"C:/Users/anon/Documents/Projects/EEA.Projects/DEP/MassAir/Web/node_modules/rxjs/Observable"' has no exported member 'Observable'. C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\node_modules\@angular\cdk\overlay\typings\position\connected-position-strategy.d.ts   12  Active
Error   TS2305  (TS) Module '"C:/Users/anon/Documents/Projects/EEA.Projects/DEP/MassAir/Web/node_modules/rxjs/Subscription"' has no exported member 'Subscription'. C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\node_modules\@angular\cdk\scrolling\typings\scroll-dispatcher.d.ts    10  Active
Error   TS2305  (TS) Module '"C:/Users/anon/Documents/Projects/EEA.Projects/DEP/MassAir/Web/node_modules/rxjs/Observable"' has no exported member 'Observable'. C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\node_modules\@angular\cdk\scrolling\typings\scroll-dispatcher.d.ts    11  Active
Error   TS2305  (TS) Module '"C:/Users/anon/Documents/Projects/EEA.Projects/DEP/MassAir/Web/node_modules/rxjs/Observable"' has no exported member 'Observable'. C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\node_modules\@angular\cdk\scrolling\typings\scrollable.d.ts   9   Active
Error   TS2305  (TS) Module '"C:/Users/anon/Documents/Projects/EEA.Projects/DEP/MassAir/Web/node_modules/rxjs/Observable"' has no exported member 'Observable'. C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\node_modules\@angular\cdk\scrolling\typings\viewport-ruler.d.ts   10  Active
Error   TS2305  (TS) Module '"C:/Users/anon/Documents/Projects/EEA.Projects/DEP/MassAir/Web/node_modules/rxjs/Subject"' has no exported member 'Subject'.   C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\node_modules\@angular\cdk\stepper\typings\stepper.d.ts    12  Active
Error   TS2474  (TS) In 'const' enum declarations member initializer must be constant expression.   C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\node_modules\@angular\compiler\src\output\output_ast.d.ts 600 Active
Error   TS2474  (TS) In 'const' enum declarations member initializer must be constant expression.   C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\node_modules\@angular\compiler\src\output\output_ast.d.ts 601 Active
Error   TS2474  (TS) In 'const' enum declarations member initializer must be constant expression.   C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\node_modules\@angular\compiler\src\output\output_ast.d.ts 602 Active
Error   TS1169  (TS) A computed property name in an interface must directly refer to a built-in symbol. C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\node_modules\@angular\core\src\render3\interfaces\container.d.ts  35  Active
Error   TS1169  (TS) A computed property name in an interface must directly refer to a built-in symbol. C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\node_modules\@angular\core\src\render3\interfaces\container.d.ts  40  Active
Error   TS1169  (TS) A computed property name in an interface must directly refer to a built-in symbol. C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\node_modules\@angular\core\src\render3\interfaces\container.d.ts  45  Active
Error   TS1169  (TS) A computed property name in an interface must directly refer to a built-in symbol. C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\node_modules\@angular\core\src\render3\interfaces\container.d.ts  50  Active
Error   TS1169  (TS) A computed property name in an interface must directly refer to a built-in symbol. C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\node_modules\@angular\core\src\render3\interfaces\container.d.ts  58  Active
Error   TS1169  (TS) A computed property name in an interface must directly refer to a built-in symbol. C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\node_modules\@angular\core\src\render3\interfaces\container.d.ts  79  Active
Error   TS1169  (TS) A computed property name in an interface must directly refer to a built-in symbol. C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\node_modules\@angular\core\src\render3\interfaces\view.d.ts   50  Active
Error   TS1169  (TS) A computed property name in an interface must directly refer to a built-in symbol. C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\node_modules\@angular\core\src\render3\interfaces\view.d.ts   56  Active
Error   TS1169  (TS) A computed property name in an interface must directly refer to a built-in symbol. C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\node_modules\@angular\core\src\render3\interfaces\view.d.ts   66  Active
Error   TS1169  (TS) A computed property name in an interface must directly refer to a built-in symbol. C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\node_modules\@angular\core\src\render3\interfaces\view.d.ts   68  Active
Error   TS1169  (TS) A computed property name in an interface must directly refer to a built-in symbol. C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\node_modules\@angular\core\src\render3\interfaces\view.d.ts   70  Active
Error   TS1169  (TS) A computed property name in an interface must directly refer to a built-in symbol. C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\node_modules\@angular\core\src\render3\interfaces\view.d.ts   79  Active
Error   TS1169  (TS) A computed property name in an interface must directly refer to a built-in symbol. C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\node_modules\@angular\core\src\render3\interfaces\view.d.ts   87  Active
Error   TS1169  (TS) A computed property name in an interface must directly refer to a built-in symbol. C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\node_modules\@angular\core\src\render3\interfaces\view.d.ts   94  Active
Error   TS1169  (TS) A computed property name in an interface must directly refer to a built-in symbol. C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\node_modules\@angular\core\src\render3\interfaces\view.d.ts   103 Active
Error   TS1169  (TS) A computed property name in an interface must directly refer to a built-in symbol. C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\node_modules\@angular\core\src\render3\interfaces\view.d.ts   109 Active
Error   TS1169  (TS) A computed property name in an interface must directly refer to a built-in symbol. C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\node_modules\@angular\core\src\render3\interfaces\view.d.ts   111 Active
Error   TS1169  (TS) A computed property name in an interface must directly refer to a built-in symbol. C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\node_modules\@angular\core\src\render3\interfaces\view.d.ts   113 Active
Error   TS1169  (TS) A computed property name in an interface must directly refer to a built-in symbol. C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\node_modules\@angular\core\src\render3\interfaces\view.d.ts   115 Active
Error   TS1169  (TS) A computed property name in an interface must directly refer to a built-in symbol. C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\node_modules\@angular\core\src\render3\interfaces\view.d.ts   122 Active
Error   TS1169  (TS) A computed property name in an interface must directly refer to a built-in symbol. C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\node_modules\@angular\core\src\render3\interfaces\view.d.ts   131 Active
Error   TS1169  (TS) A computed property name in an interface must directly refer to a built-in symbol. C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\node_modules\@angular\core\src\render3\interfaces\view.d.ts   137 Active
Error   TS2474  (TS) In 'const' enum declarations member initializer must be constant expression.   C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\node_modules\@angular\core\src\sanitization\bypass.d.ts   10  Active
Error   TS2474  (TS) In 'const' enum declarations member initializer must be constant expression.   C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\node_modules\@angular\core\src\sanitization\bypass.d.ts   11  Active
Error   TS2474  (TS) In 'const' enum declarations member initializer must be constant expression.   C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\node_modules\@angular\core\src\sanitization\bypass.d.ts   12  Active
Error   TS2474  (TS) In 'const' enum declarations member initializer must be constant expression.   C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\node_modules\@angular\core\src\sanitization\bypass.d.ts   13  Active
Error   TS2474  (TS) In 'const' enum declarations member initializer must be constant expression.   C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\node_modules\@angular\core\src\sanitization\bypass.d.ts   14  Active
Error   TS1169  (TS) A computed property name in an interface must directly refer to a built-in symbol. C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\node_modules\@angular\core\src\sanitization\bypass.d.ts   23  Active
Error   TS1169  (TS) A computed property name in an interface must directly refer to a built-in symbol. C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\node_modules\@angular\core\src\sanitization\bypass.d.ts   31  Active
Error   TS2535  (TS) Enum type 'BypassType' has members with initializers that are not literals.    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\node_modules\@angular\core\src\sanitization\bypass.d.ts   31  Active
Error   TS1169  (TS) A computed property name in an interface must directly refer to a built-in symbol. C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\node_modules\@angular\core\src\sanitization\bypass.d.ts   39  Active
Error   TS2535  (TS) Enum type 'BypassType' has members with initializers that are not literals.    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\node_modules\@angular\core\src\sanitization\bypass.d.ts   39  Active
Error   TS1169  (TS) A computed property name in an interface must directly refer to a built-in symbol. C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\node_modules\@angular\core\src\sanitization\bypass.d.ts   47  Active
Error   TS2535  (TS) Enum type 'BypassType' has members with initializers that are not literals.    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\node_modules\@angular\core\src\sanitization\bypass.d.ts   47  Active
Error   TS1169  (TS) A computed property name in an interface must directly refer to a built-in symbol. C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\node_modules\@angular\core\src\sanitization\bypass.d.ts   55  Active
Error   TS2535  (TS) Enum type 'BypassType' has members with initializers that are not literals.    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\node_modules\@angular\core\src\sanitization\bypass.d.ts   55  Active
Error   TS1169  (TS) A computed property name in an interface must directly refer to a built-in symbol. C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\node_modules\@angular\core\src\sanitization\bypass.d.ts   63  Active
Error   TS2535  (TS) Enum type 'BypassType' has members with initializers that are not literals.    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\node_modules\@angular\core\src\sanitization\bypass.d.ts   63  Active
Error   TS2305  (TS) Module '"C:/Users/anon/Documents/Projects/EEA.Projects/DEP/MassAir/Web/node_modules/rxjs/Observable"' has no exported member 'Observable'. C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\node_modules\@angular\material\autocomplete\typings\autocomplete-trigger.d.ts 14  Active
Error   TS2305  (TS) Module '"C:/Users/anon/Documents/Projects/EEA.Projects/DEP/MassAir/Web/node_modules/rxjs/Observable"' has no exported member 'Observable'. C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\node_modules\@angular\material\chips\typings\chip-list.d.ts   15  Active
Error   TS2305  (TS) Module '"C:/Users/anon/Documents/Projects/EEA.Projects/DEP/MassAir/Web/node_modules/rxjs/Subject"' has no exported member 'Subject'.   C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\node_modules\@angular\material\chips\typings\chip.d.ts    11  Active
Error   TS2305  (TS) Module '"C:/Users/anon/Documents/Projects/EEA.Projects/DEP/MassAir/Web/node_modules/rxjs/Subject"' has no exported member 'Subject'.   C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\node_modules\@angular\material\core\typings\common-behaviors\error-state.d.ts 11  Active
Error   TS2305  (TS) Module '"C:/Users/anon/Documents/Projects/EEA.Projects/DEP/MassAir/Web/node_modules/rxjs/Observable"' has no exported member 'Observable'. C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\node_modules\@angular\material\core\typings\common-behaviors\initialized.d.ts 9   Active
Error   TS2305  (TS) Module '"C:/Users/anon/Documents/Projects/EEA.Projects/DEP/MassAir/Web/node_modules/rxjs/Observable"' has no exported member 'Observable'. C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\node_modules\@angular\material\core\typings\datetime\date-adapter.d.ts    9   Active
Error   TS2305  (TS) Module '"C:/Users/anon/Documents/Projects/EEA.Projects/DEP/MassAir/Web/node_modules/rxjs/Subject"' has no exported member 'Subject'.   C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\node_modules\@angular\material\core\typings\datetime\date-adapter.d.ts    10  Active
Error   TS2305  (TS) Module '"C:/Users/anon/Documents/Projects/EEA.Projects/DEP/MassAir/Web/node_modules/rxjs/Subject"' has no exported member 'Subject'.   C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\node_modules\@angular\material\core\typings\option\option.d.ts    1   Active
Error   TS2305  (TS) Module '"C:/Users/anon/Documents/Projects/EEA.Projects/DEP/MassAir/Web/node_modules/rxjs/Subject"' has no exported member 'Subject'.   C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\node_modules\@angular\material\datepicker\typings\datepicker-intl.d.ts    1   Active
Error   TS2305  (TS) Module '"C:/Users/anon/Documents/Projects/EEA.Projects/DEP/MassAir/Web/node_modules/rxjs/Observable"' has no exported member 'Observable'. C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\node_modules\@angular\material\dialog\typings\dialog-ref.d.ts 11  Active
Error   TS2305  (TS) Module '"C:/Users/anon/Documents/Projects/EEA.Projects/DEP/MassAir/Web/node_modules/rxjs/Observable"' has no exported member 'Observable'. C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\node_modules\@angular\material\dialog\typings\dialog.d.ts 5   Active
Error   TS2305  (TS) Module '"C:/Users/anon/Documents/Projects/EEA.Projects/DEP/MassAir/Web/node_modules/rxjs/Subject"' has no exported member 'Subject'.   C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\node_modules\@angular\material\dialog\typings\dialog.d.ts 6   Active
Error   TS2305  (TS) Module '"C:/Users/anon/Documents/Projects/EEA.Projects/DEP/MassAir/Web/node_modules/rxjs/Subject"' has no exported member 'Subject'.   C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\node_modules\@angular\material\expansion\typings\expansion-panel.d.ts 13  Active
Error   TS2305  (TS) Module '"C:/Users/anon/Documents/Projects/EEA.Projects/DEP/MassAir/Web/node_modules/rxjs/Observable"' has no exported member 'Observable'. C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\node_modules\@angular\material\form-field\typings\form-field-control.d.ts 8   Active
Error   TS2305  (TS) Module '"C:/Users/anon/Documents/Projects/EEA.Projects/DEP/MassAir/Web/node_modules/rxjs/Observable"' has no exported member 'Observable'. C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\node_modules\@angular\material\icon\typings\icon-registry.d.ts    4   Active
Error   TS2305  (TS) Module '"C:/Users/anon/Documents/Projects/EEA.Projects/DEP/MassAir/Web/node_modules/rxjs/Subject"' has no exported member 'Subject'.   C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\node_modules\@angular\material\sort\typings\sort-header-intl.d.ts 9   Active
Error   TS2305  (TS) Module '"C:/Users/anon/Documents/Projects/EEA.Projects/DEP/MassAir/Web/node_modules/rxjs/Subject"' has no exported member 'Subject'.   C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    

C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\node_modules\@angular\material\sort\typings\sort.d.ts 11  Active
    Error   TS2305  (TS) Module '"C:/Users/anon/Documents/Projects/EEA.Projects/DEP/MassAir/Web/node_modules/rxjs/Subject"' has no exported member 'Subject'.   C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\node_modules\@angular\material\stepper\typings\stepper-intl.d.ts  1   Active
    Error   TS2307  (TS) Cannot find module 'rxjs-compat/Observable'.   C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\node_modules\rxjs\Observable.d.ts 1   Active
    Error   TS2307  (TS) Cannot find module 'rxjs-compat/Subject'.  C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\node_modules\rxjs\Subject.d.ts    1   Active
    Error   TS2307  (TS) Cannot find module 'rxjs-compat/Subscription'. C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\node_modules\rxjs\Subscription.d.ts   1   Active
    Error   TS2345  (TS) Argument of type '{}' is not assignable to parameter of type 'string'. C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\src\app\components\lookup\lookup.component.ts 68  Active
    Error   TS2345  (TS) Argument of type '{}' is not assignable to parameter of type 'string'. C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\src\app\components\monitor\monitor.component.ts   76  Active
    Error   TS2345  (TS) Argument of type '{}' is not assignable to parameter of type 'string'. C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\src\app\components\parameter\parameter.component.ts   76  Active
    Error   TS2339  (TS) Property 'length' does not exist on type '{}'. C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\src\app\components\pollution\pollution.component.ts   110 Active
    Error   TS2345  (TS) Argument of type '{

}' is not assignable to parameter of type 'string'. C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\src\app\components\rule\rule.component.ts 89  Active
Error   TS2345  (TS) Argument of type '{}' is not assignable to parameter of type 'string'. C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\src\app\components\rule\rule.component.ts 99  Active
Error   TS2345  (TS) Argument of type '{}' is not assignable to parameter of type 'string'. C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web (tsconfig or jsconfig project)    C:\Users\anon\Documents\Projects\EEA.Projects\DEP\MassAir\Web\src\app\components\site\site.component.ts 125 Active  

推荐答案

这是一个打字稿版本问题,您可以通过在项目属性中更改打字稿版本来解决它.安装 Typescript 3.0.1.

It is a typescript versioning issue, you may resolve it by changing Typescript version in project properties. Install Typescript 3.0.1.

在解决方案资源管理器中右键单击项目节点点击属性

Right click on the project node in Solution ExplorerClick Properties

转到 TypeScript 构建选项卡

Go to the TypeScript Build tab

将 TypeScript 版本更改为所需版本或使用最新可用"以始终默认为安装的最新版本.

Change TypeScript version to the desired version or "use latest available" to always default to the newest version installed.

这篇关于angular 6 升级后出现很多智能感知错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-29 06:50