mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-12 21:10:23 +00:00
Remove unneeded references
This commit is contained in:
+7
-7
@@ -2,14 +2,14 @@
|
||||
|
||||
## Referencing AngularJS definition files in your code
|
||||
|
||||
To do that, simply add `/// <reference path="angular.d.ts" />` at the top of your code.
|
||||
To do that, simply add `` at the top of your code.
|
||||
|
||||
That will make available to your code all interfaces AngularJS' main module **ng** implements, as well as the **AUTO** module.
|
||||
|
||||
If you are including other AngularJS' modules in your code, like **ngResource**, just like you needed to include the additional module implementation file in your code, _angular-resource.js_, you will also need to reference the definitions file related to that module. Your code would then have the following definitions files reference:
|
||||
|
||||
/// <reference path="angular.d.ts" />
|
||||
/// <reference path="angular-resource.d.ts" />
|
||||
|
||||
|
||||
|
||||
Having these modules in separated files is actually good because they sometimes either augment or modify some of **ng**'s interfaces, and thus those differences should only be available to you when you really need them. Also, it forces you to explicit what you're going to be using.
|
||||
|
||||
@@ -107,8 +107,8 @@ function Controller($scope: ICustomScope) {
|
||||
|
||||
### Working with $resource
|
||||
```ts
|
||||
/// <reference path="angular.d.ts" />
|
||||
/// <reference path="angular-resource.d.ts" />
|
||||
|
||||
|
||||
|
||||
// We have the option to define arguments for a custom resource
|
||||
interface IArticleParameters {
|
||||
@@ -177,8 +177,8 @@ function MainController($resource: ng.resource.IResourceService) {
|
||||
|
||||
### Working with $resource in angular-1.0 definitions
|
||||
```ts
|
||||
/// <reference path="angular-1.0.d.ts" />
|
||||
/// <reference path="angular-resource-1.0.d.ts" />
|
||||
|
||||
|
||||
|
||||
// Let's define a custom resource
|
||||
interface IArticleResourceClass extends ng.resource.IResourceClass {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/// <reference path="angular-mocks.d.ts" />
|
||||
|
||||
|
||||
///////////////////////////////////////
|
||||
// IAngularStatic
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/// <reference path="angular-resource.d.ts" />
|
||||
|
||||
|
||||
|
||||
import IHttpPromiseCallbackArg = angular.IHttpPromiseCallbackArg;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
/// <reference path="angular-route.d.ts" />
|
||||
|
||||
|
||||
/**
|
||||
* @license HTTP Auth Interceptor Module for AngularJS
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/// <reference path="angular-sanitize.d.ts" />
|
||||
|
||||
|
||||
var shouldBeString: string;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/// <reference path="angular-1.0.d.ts" />
|
||||
|
||||
|
||||
// issue: https://github.com/DefinitelyTyped/DefinitelyTyped/issues/369
|
||||
https://github.com/witoldsz/angular-http-auth/blob/master/src/angular-http-auth.js
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/// <reference path="angular-1.2.d.ts" />
|
||||
|
||||
|
||||
// issue: https://github.com/DefinitelyTyped/DefinitelyTyped/issues/369
|
||||
// https://github.com/witoldsz/angular-http-auth/blob/master/src/angular-http-auth.js
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
// Definitions by: Michel Salib <https://github.com/michelsalib>, Adi Dahiya <https://github.com/adidahiya>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference path="angular-1.2.d.ts" />
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// ngAnimate module (angular-animate.js)
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
// Definitions by: Michel Salib <https://github.com/michelsalib>, Adi Dahiya <https://github.com/adidahiya>, Raphael Schweizer <https://github.com/rasch>, Cody Schaaf <https://github.com/codyschaaf>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference path="angular-1.4.d.ts" />
|
||||
|
||||
|
||||
declare module "angular-animate" {
|
||||
var _: string;
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
|
||||
/// <reference path="angular-1.0.d.ts" />
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// ngCookies module (angular-cookies.js)
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
|
||||
/// <reference path="angular-1.2.d.ts" />
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// ngCookies module (angular-cookies.js)
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
|
||||
/// <reference path="angular-1.0.d.ts" />
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// functions attached to global object (window)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/// <reference path="angular-mocks-1.2.d.ts" />
|
||||
|
||||
|
||||
///////////////////////////////////////
|
||||
// IAngularStatic
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
// Definitions by: Diego Vilar <http://github.com/diegovilar>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference path="angular-1.2.d.ts" />
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// functions attached to global object (window)
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
// Definitions by: Diego Vilar <http://github.com/diegovilar>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference path="angular-1.0.d.ts" />
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/// <reference path="angular-resource-1.2.d.ts" />
|
||||
|
||||
|
||||
interface IMyResource extends ng.resource.IResource<IMyResource> { };
|
||||
interface IMyResourceClass extends ng.resource.IResourceClass<IMyResource> { };
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
// Definitions by: Diego Vilar <http://github.com/diegovilar>, Michael Jess <http://github.com/miffels>
|
||||
// Definitions: https://github.com/daptiv/DefinitelyTyped
|
||||
|
||||
/// <reference path="angular-1.2.d.ts" />
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
// Definitions by: Diego Vilar <http://github.com/diegovilar>, Michael Jess <http://github.com/miffels>
|
||||
// Definitions: https://github.com/daptiv/DefinitelyTyped
|
||||
|
||||
/// <reference path="angular-1.4.d.ts" />
|
||||
|
||||
|
||||
declare module 'angular-resource' {
|
||||
var _: string;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/// <reference path="angular-route-1.2.d.ts" />
|
||||
|
||||
|
||||
/**
|
||||
* @license HTTP Auth Interceptor Module for AngularJS
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
// Definitions by: Jonathan Park <https://github.com/park9140>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference path="angular-1.2.d.ts" />
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
|
||||
/// <reference path="angular-1.0.d.ts" />
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// ngSanitize module (angular-sanitize.js)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/// <reference path="angular-sanitize-1.2.d.ts" />
|
||||
|
||||
|
||||
var shouldBeString: string;
|
||||
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
|
||||
/// <reference path="angular-1.2.d.ts" />
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// ngSanitize module (angular-sanitize.js)
|
||||
|
||||
Reference in New Issue
Block a user