Reporter | William Warby (wwarby.1) |
---|---|
Created | Sep 22, 2017 12:23:47 PM |
Updated | Apr 17, 2018 6:22:46 PM |
Resolved | Apr 3, 2018 4:58:02 PM |
Subsystem | TypeScript |
Assignee | Nikita Popov (poksh) |
Priority | Critical |
State | Fixed |
Type | Bug |
Fix version | 2018.1 |
Affected versions | No Affected versions |
Fixed In Version ReSharper | 2017.2 EAP 6 |
VsVersion | All Versions |
ReSharper is reporting an error that the TypeScript compiler does not report on Angular 1.x controllers written in TypeScript. Example:
Error:
Solution He.Connect.Dashboard.sln
Project He.Connect.Dashboard.Ui
He.Connect.Dashboard.Ui\Source\Scripts\Controllers\BodyController.ts:28 Supplied parameters do not match any signature of call target: parameter type mismatch. Parameter 'controllerConstructor' should have type assignable to '(((...args: any[]) => Object) | ((...args: any[]) => void | Object) | ((string | ((...args: any[]) => Object) | ((...args: any[]) => void | Object))[]))', but it has type 'typeof FooController'.
Using Angular typings file: "@types/angular": "1.6.25"
I'm pretty sure this error is spurious as I haven't change the syntax of my code and it compiles and runs just fine.
`module Foo {
class FooController { }
angular
.module('app')
.controller('fooController', FooController);
}
`Error:
Solution He.Connect.Dashboard.sln
Project He.Connect.Dashboard.Ui
He.Connect.Dashboard.Ui\Source\Scripts\Controllers\BodyController.ts:28 Supplied parameters do not match any signature of call target: parameter type mismatch. Parameter 'controllerConstructor' should have type assignable to '(((...args: any[]) => Object) | ((...args: any[]) => void | Object) | ((string | ((...args: any[]) => Object) | ((...args: any[]) => void | Object))[]))', but it has type 'typeof FooController'.
Using Angular typings file: "@types/angular": "1.6.25"
I'm pretty sure this error is spurious as I haven't change the syntax of my code and it compiles and runs just fine.