AngularJS type , Angular TypeScript.
, ( ), , , ( , JavaScript ) , , , :
interface Example {
($scope: bool, $location: string, Project: number): void;
($location: string, $scope: bool, Project: number): void;
(Project: number, $scope: bool, $location: string): void;
}
declare var example: Example;
example(, intellisense , , .
JavaScript , , , , ...
interface ExampleArguments {
scope: bool;
location: string;
project: number;
}
var example = function (exampleArguments: ExampleArguments) {
};
example({ scope: true, project: 4, location: 'hi' });
TypeScript.