Angular sub packages (#10170)

* move angular-animate.d.ts to its own folder

* Make angular-animate a module, and use module augmentation to update the angular module

* Move angular-cookies.d.ts to its own folder

* Make angular-cookies a module, and use module augmentation to update the angular module

* Remove outdated readme

* Move angular-mocks.d.ts to its own folder

* Make angular-mocks a module, and use module augmentation to update the angular module

* Move angular-resource.d.ts to its own folder

* Make angular-resource a module, and use module augmentation to update the angular module

* Move angular-route.d.ts to its own folder

* Make angular-route a module, and use module augmentation to update the angular module

* Move angular-santize.d.ts to its own folder

* Make angular-sanitize a module, and use module augmentation to update the angular module
This commit is contained in:
Mohamed Hegazy
2016-07-18 15:36:53 -07:00
committed by GitHub
parent 97b9467d7b
commit 4e78cb2edd
23 changed files with 905 additions and 804 deletions

View File

@@ -0,0 +1,8 @@
var shouldBeString: string;
declare var $sanitizeService: ng.sanitize.ISanitizeService;
shouldBeString = $sanitizeService(shouldBeString);
declare var $linky: ng.sanitize.filter.ILinky;
shouldBeString = $linky(shouldBeString);
shouldBeString = $linky(shouldBeString, shouldBeString);

38
angular-sanitize/index.d.ts vendored Normal file
View File

@@ -0,0 +1,38 @@
// Type definitions for Angular JS 1.3 (ngSanitize module)
// Project: http://angularjs.org
// Definitions by: Diego Vilar <http://github.com/diegovilar>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare var _: string;
export = _;
import * as angular from 'angular';
declare module 'angular' {
///////////////////////////////////////////////////////////////////////////////
// ngSanitize module (angular-sanitize.js)
///////////////////////////////////////////////////////////////////////////////
namespace sanitize {
///////////////////////////////////////////////////////////////////////////
// SanitizeService
// see http://docs.angularjs.org/api/ngSanitize.$sanitize
///////////////////////////////////////////////////////////////////////////
interface ISanitizeService {
(html: string): string;
}
///////////////////////////////////////////////////////////////////////////
// Filters included with the ngSanitize
// see https://github.com/angular/angular.js/tree/v1.2.0/src/ngSanitize/filter
///////////////////////////////////////////////////////////////////////////
export namespace filter {
// Finds links in text input and turns them into html links.
// Supports http/https/ftp/mailto and plain email address links.
// see http://code.angularjs.org/1.2.0/docs/api/ngSanitize.filter:linky
interface ILinky {
(text: string, target?: string): string;
}
}
}
}

View File

@@ -0,0 +1,19 @@
{
"files": [
"index.d.ts",
"angular-sanitize-tests.ts"
],
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"noImplicitAny": true,
"strictNullChecks": false,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": false
}
}