parent
0c3738a780
commit
e3064d5432
@ -20,9 +20,9 @@ http_archive(
|
|||||||
|
|
||||||
http_archive(
|
http_archive(
|
||||||
name = "build_bazel_rules_typescript",
|
name = "build_bazel_rules_typescript",
|
||||||
url = "https://github.com/bazelbuild/rules_typescript/archive/7c49a0943e7ccca73bee0b8fc5f01ca2c3dcfe8b.zip",
|
url = "https://github.com/rkirov/rules_typescript/archive/v0.16.0.zip",
|
||||||
strip_prefix = "rules_typescript-7c49a0943e7ccca73bee0b8fc5f01ca2c3dcfe8b",
|
strip_prefix = "rules_typescript-0.16.0",
|
||||||
sha256 = "9707cdafc0e59f06cf5336b1c68d8f3d04fae9f3471c0eb205a669b8b5fafc81",
|
sha256 = "f5aedd3a792e5af19cd0c0f0318cb692e2989e816e896e794152d07808fccacd",
|
||||||
)
|
)
|
||||||
|
|
||||||
http_archive(
|
http_archive(
|
||||||
|
49
integration/typings_test_ts29/include-all.ts
Normal file
49
integration/typings_test_ts29/include-all.ts
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
/**
|
||||||
|
* @license
|
||||||
|
* Copyright Google Inc. All Rights Reserved.
|
||||||
|
*
|
||||||
|
* Use of this source code is governed by an MIT-style license that can be
|
||||||
|
* found in the LICENSE file at https://angular.io/license
|
||||||
|
*/
|
||||||
|
|
||||||
|
import * as compiler from '@angular/compiler';
|
||||||
|
import * as compilerTesting from '@angular/compiler/testing';
|
||||||
|
import * as core from '@angular/core';
|
||||||
|
import * as coreTesting from '@angular/core/testing';
|
||||||
|
import * as elements from '@angular/elements';
|
||||||
|
import * as forms from '@angular/forms';
|
||||||
|
import * as http from '@angular/http';
|
||||||
|
import * as httpTesting from '@angular/http/testing';
|
||||||
|
import * as platformBrowser from '@angular/platform-browser';
|
||||||
|
import * as platformBrowserTesting from '@angular/platform-browser/testing';
|
||||||
|
import * as platformBrowserDynamic from '@angular/platform-browser-dynamic';
|
||||||
|
import * as platformServer from '@angular/platform-server';
|
||||||
|
import * as platformServerTesting from '@angular/platform-server/testing';
|
||||||
|
import * as platformWebworker from '@angular/platform-webworker';
|
||||||
|
import * as platformWebworkerDynamic from '@angular/platform-webworker-dynamic';
|
||||||
|
import * as router from '@angular/router';
|
||||||
|
import * as routerTesting from '@angular/router/testing';
|
||||||
|
import * as serviceWorker from '@angular/service-worker';
|
||||||
|
import * as upgrade from '@angular/upgrade';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
compiler,
|
||||||
|
compilerTesting,
|
||||||
|
core,
|
||||||
|
coreTesting,
|
||||||
|
elements,
|
||||||
|
forms,
|
||||||
|
http,
|
||||||
|
httpTesting,
|
||||||
|
platformBrowser,
|
||||||
|
platformBrowserTesting,
|
||||||
|
platformBrowserDynamic,
|
||||||
|
platformServer,
|
||||||
|
platformServerTesting,
|
||||||
|
platformWebworker,
|
||||||
|
platformWebworkerDynamic,
|
||||||
|
router,
|
||||||
|
routerTesting,
|
||||||
|
serviceWorker,
|
||||||
|
upgrade,
|
||||||
|
};
|
31
integration/typings_test_ts29/package.json
Normal file
31
integration/typings_test_ts29/package.json
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
{
|
||||||
|
"name": "angular-integration",
|
||||||
|
"description": "Assert that users with TypeScript 2.8 can type-check an Angular application",
|
||||||
|
"version": "0.0.0",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@angular/animations": "file:../../dist/packages-dist/animations",
|
||||||
|
"@angular/common": "file:../../dist/packages-dist/common",
|
||||||
|
"@angular/compiler": "file:../../dist/packages-dist/compiler",
|
||||||
|
"@angular/compiler-cli": "file:../../dist/packages-dist/compiler-cli",
|
||||||
|
"@angular/core": "file:../../dist/packages-dist/core",
|
||||||
|
"@angular/elements": "file:../../dist/packages-dist/elements",
|
||||||
|
"@angular/forms": "file:../../dist/packages-dist/forms",
|
||||||
|
"@angular/http": "file:../../dist/packages-dist/http",
|
||||||
|
"@angular/platform-browser": "file:../../dist/packages-dist/platform-browser",
|
||||||
|
"@angular/platform-browser-dynamic": "file:../../dist/packages-dist/platform-browser-dynamic",
|
||||||
|
"@angular/platform-server": "file:../../dist/packages-dist/platform-server",
|
||||||
|
"@angular/platform-webworker": "file:../../dist/packages-dist/platform-webworker",
|
||||||
|
"@angular/platform-webworker-dynamic": "file:../../dist/packages-dist/platform-webworker-dynamic",
|
||||||
|
"@angular/router": "file:../../dist/packages-dist/router",
|
||||||
|
"@angular/service-worker": "file:../../dist/packages-dist/service-worker",
|
||||||
|
"@angular/upgrade": "file:../../dist/packages-dist/upgrade",
|
||||||
|
"@types/jasmine": "2.5.41",
|
||||||
|
"rxjs": "file:../../node_modules/rxjs",
|
||||||
|
"typescript": "2.8.x",
|
||||||
|
"zone.js": "file:../../node_modules/zone.js"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"test": "tsc"
|
||||||
|
}
|
||||||
|
}
|
24
integration/typings_test_ts29/tsconfig.json
Normal file
24
integration/typings_test_ts29/tsconfig.json
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"emitDecoratorMetadata": true,
|
||||||
|
"experimentalDecorators": true,
|
||||||
|
"module": "commonjs",
|
||||||
|
"moduleResolution": "node",
|
||||||
|
"outDir": "../../dist/typings_test_ts28/",
|
||||||
|
"rootDir": ".",
|
||||||
|
"target": "es5",
|
||||||
|
"lib": [
|
||||||
|
"es5",
|
||||||
|
"dom",
|
||||||
|
"es2015.collection",
|
||||||
|
"es2015.iterable",
|
||||||
|
"es2015.promise"
|
||||||
|
],
|
||||||
|
"types": [],
|
||||||
|
"strictNullChecks": true
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"include-all.ts",
|
||||||
|
"node_modules/@types/jasmine/index.d.ts"
|
||||||
|
]
|
||||||
|
}
|
@ -7,10 +7,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import {NgIf} from '@angular/common';
|
import {NgIf} from '@angular/common';
|
||||||
import {ComponentFactory, ComponentFactoryResolver, ComponentRef, ErrorHandler, Injector, NgModuleRef, RendererFactory2, RootRenderer, Sanitizer, TemplateRef, ViewContainerRef} from '@angular/core';
|
import {ComponentFactory, ComponentFactoryResolver, ComponentRef, ErrorHandler, Injector, NgModuleRef, RendererFactory2, RootRenderer, Sanitizer, TemplateRef, ViewContainerRef, ɵArgumentType as ArgumentType, ɵBindingFlags as BindingFlags, ɵNodeFlags as NodeFlags, ɵViewDefinition as ViewDefinition, ɵViewFlags as ViewFlags, ɵand as anchorDef, ɵccf as createComponentFactory, ɵdid as directiveDef, ɵeld as elementDef, ɵinitServicesIfNeeded as initServicesIfNeeded, ɵted as textDef, ɵvid as viewDef} from '@angular/core';
|
||||||
import {ArgumentType, BindingFlags, NodeFlags, ViewDefinition, ViewFlags, anchorDef, createComponentFactory, directiveDef, elementDef, initServicesIfNeeded, textDef, viewDef} from '@angular/core/src/view/index';
|
import {SafeStyle, ɵDomRendererFactory2 as DomRendererFactory2, ɵDomSanitizerImpl as DomSanitizerImpl} from '@angular/platform-browser';
|
||||||
import {DomRendererFactory2} from '@angular/platform-browser/src/dom/dom_renderer';
|
|
||||||
import {DomSanitizerImpl, SafeStyle} from '@angular/platform-browser/src/security/dom_sanitization_service';
|
|
||||||
|
|
||||||
import {TreeNode, emptyTree} from '../util';
|
import {TreeNode, emptyTree} from '../util';
|
||||||
|
|
||||||
|
@ -7,7 +7,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import {ɵC as C, ɵE as E, ɵRenderFlags as RenderFlags, ɵT as T, ɵV as V, ɵb as b, ɵcR as cR, ɵcr as cr, ɵdefineComponent as defineComponent, ɵdetectChanges as _detectChanges, ɵe as e, ɵi1 as i1, ɵp as p, ɵsn as sn, ɵt as t, ɵv as v} from '@angular/core';
|
import {ɵC as C, ɵE as E, ɵRenderFlags as RenderFlags, ɵT as T, ɵV as V, ɵb as b, ɵcR as cR, ɵcr as cr, ɵdefineComponent as defineComponent, ɵdetectChanges as _detectChanges, ɵe as e, ɵi1 as i1, ɵp as p, ɵsn as sn, ɵt as t, ɵv as v} from '@angular/core';
|
||||||
import {ComponentDefInternal} from '@angular/core/src/render3/interfaces/definition';
|
|
||||||
|
|
||||||
import {TreeNode, buildTree, emptyTree} from '../util';
|
import {TreeNode, buildTree, emptyTree} from '../util';
|
||||||
|
|
||||||
@ -35,7 +34,7 @@ export class TreeComponent {
|
|||||||
data: TreeNode = emptyTree;
|
data: TreeNode = emptyTree;
|
||||||
|
|
||||||
/** @nocollapse */
|
/** @nocollapse */
|
||||||
static ngComponentDef: ComponentDefInternal<TreeComponent> = defineComponent({
|
static ngComponentDef = defineComponent({
|
||||||
type: TreeComponent,
|
type: TreeComponent,
|
||||||
selectors: [['tree']],
|
selectors: [['tree']],
|
||||||
template: function(rf: RenderFlags, ctx: TreeComponent) {
|
template: function(rf: RenderFlags, ctx: TreeComponent) {
|
||||||
@ -95,7 +94,7 @@ export class TreeFunction {
|
|||||||
data: TreeNode = emptyTree;
|
data: TreeNode = emptyTree;
|
||||||
|
|
||||||
/** @nocollapse */
|
/** @nocollapse */
|
||||||
static ngComponentDef: ComponentDefInternal<TreeFunction> = defineComponent({
|
static ngComponentDef = defineComponent({
|
||||||
type: TreeFunction,
|
type: TreeFunction,
|
||||||
selectors: [['tree']],
|
selectors: [['tree']],
|
||||||
template: function(rf: RenderFlags, ctx: TreeFunction) {
|
template: function(rf: RenderFlags, ctx: TreeFunction) {
|
||||||
|
@ -110,11 +110,11 @@
|
|||||||
"source-map": "0.5.7",
|
"source-map": "0.5.7",
|
||||||
"source-map-support": "0.4.18",
|
"source-map-support": "0.4.18",
|
||||||
"systemjs": "0.18.10",
|
"systemjs": "0.18.10",
|
||||||
"tsickle": "^0.29.0",
|
"tsickle": "0.32",
|
||||||
"tslint": "5.7.0",
|
"tslint": "5.7.0",
|
||||||
"tslint-eslint-rules": "4.1.1",
|
"tslint-eslint-rules": "4.1.1",
|
||||||
"tsutils": "2.20.0",
|
"tsutils": "2.20.0",
|
||||||
"typescript": "2.8.x",
|
"typescript": "2.9.x",
|
||||||
"uglify-es": "^3.3.9",
|
"uglify-es": "^3.3.9",
|
||||||
"universal-analytics": "0.4.15",
|
"universal-analytics": "0.4.15",
|
||||||
"vlq": "0.2.2",
|
"vlq": "0.2.2",
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@angular/compiler-cli": "0.0.0-PLACEHOLDER",
|
"@angular/compiler-cli": "0.0.0-PLACEHOLDER",
|
||||||
"typescript": ">=2.7.2 <2.9"
|
"typescript": ">=2.7.2 <2.10"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
@ -152,7 +152,7 @@ function main(args: string[]): number {
|
|||||||
allsrcs.filter(hasFileExtension('.d.ts')).forEach((f: string) => {
|
allsrcs.filter(hasFileExtension('.d.ts')).forEach((f: string) => {
|
||||||
const content = fs.readFileSync(f, 'utf-8')
|
const content = fs.readFileSync(f, 'utf-8')
|
||||||
// Strip the named AMD module for compatibility with non-bazel users
|
// Strip the named AMD module for compatibility with non-bazel users
|
||||||
.replace(/^\/\/\/ <amd-module name=.*\/>\n/, '');
|
.replace(/^\/\/\/ <amd-module name=.*\/>\n/gm, '');
|
||||||
writeFileFromInputPath(f, content);
|
writeFileFromInputPath(f, content);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -22,6 +22,10 @@ npm_package(
|
|||||||
# We don't actually import anything in the locale code so we can
|
# We don't actually import anything in the locale code so we can
|
||||||
# null out the require reference passed into the module.
|
# null out the require reference passed into the module.
|
||||||
"factory\(require, exports\)": "factory(null, exports)",
|
"factory\(require, exports\)": "factory(null, exports)",
|
||||||
|
|
||||||
|
# Workaround for `.d.ts`` containing `/// <amd-module .../>`
|
||||||
|
# which are generated in TypeScript v2.9, but not before.
|
||||||
|
"/// <amd-module name=.*/>": "",
|
||||||
},
|
},
|
||||||
deps = [":locales"],
|
deps = [":locales"],
|
||||||
)
|
)
|
||||||
|
@ -11,11 +11,11 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"reflect-metadata": "^0.1.2",
|
"reflect-metadata": "^0.1.2",
|
||||||
"minimist": "^1.2.0",
|
"minimist": "^1.2.0",
|
||||||
"tsickle": "^0.29.0",
|
"tsickle": "^0.30.0",
|
||||||
"chokidar": "^1.4.2"
|
"chokidar": "^1.4.2"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"typescript": ">=2.7.2 <2.9",
|
"typescript": ">=2.7.2 <2.10",
|
||||||
"@angular/compiler": "0.0.0-PLACEHOLDER"
|
"@angular/compiler": "0.0.0-PLACEHOLDER"
|
||||||
},
|
},
|
||||||
"engines" : {
|
"engines" : {
|
||||||
|
@ -109,7 +109,7 @@ const MIN_TS_VERSION = '2.7.2';
|
|||||||
* ∀ supported typescript version v, v < MAX_TS_VERSION
|
* ∀ supported typescript version v, v < MAX_TS_VERSION
|
||||||
* MAX_TS_VERSION is not considered as a supported TypeScript version
|
* MAX_TS_VERSION is not considered as a supported TypeScript version
|
||||||
*/
|
*/
|
||||||
const MAX_TS_VERSION = '2.9.0';
|
const MAX_TS_VERSION = '2.10.0';
|
||||||
|
|
||||||
class AngularCompilerProgram implements Program {
|
class AngularCompilerProgram implements Program {
|
||||||
private rootNames: string[];
|
private rootNames: string[];
|
||||||
|
@ -974,7 +974,7 @@ describe('Collector', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('regerssion', () => {
|
describe('regression', () => {
|
||||||
it('should be able to collect a short-hand property value', () => {
|
it('should be able to collect a short-hand property value', () => {
|
||||||
const metadata = collectSource(`
|
const metadata = collectSource(`
|
||||||
const children = { f1: 1 };
|
const children = { f1: 1 };
|
||||||
@ -1040,37 +1040,6 @@ describe('Collector', () => {
|
|||||||
.not.toBeUndefined('typeGuard was not collected');
|
.not.toBeUndefined('typeGuard was not collected');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should be able to collect an invalid access expression', () => {
|
|
||||||
const source = createSource(`
|
|
||||||
import {Component} from '@angular/core';
|
|
||||||
|
|
||||||
const value = [];
|
|
||||||
@Component({
|
|
||||||
provider: [{provide: 'some token', useValue: value[]}]
|
|
||||||
})
|
|
||||||
export class MyComponent {}
|
|
||||||
`);
|
|
||||||
const metadata = collector.getMetadata(source) !;
|
|
||||||
expect(metadata.metadata.MyComponent).toEqual({
|
|
||||||
__symbolic: 'class',
|
|
||||||
decorators: [{
|
|
||||||
__symbolic: 'call',
|
|
||||||
expression: {
|
|
||||||
__symbolic: 'reference',
|
|
||||||
module: '@angular/core',
|
|
||||||
name: 'Component',
|
|
||||||
line: 4,
|
|
||||||
character: 9
|
|
||||||
},
|
|
||||||
arguments: [{
|
|
||||||
__symbolic: 'error',
|
|
||||||
message: 'Expression form not supported',
|
|
||||||
line: 5,
|
|
||||||
character: 55
|
|
||||||
}]
|
|
||||||
}]
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('references', () => {
|
describe('references', () => {
|
||||||
|
@ -28,5 +28,5 @@ export {_sanitizeUrl as ɵ_sanitizeUrl} from './sanitization/url_sanitizer';
|
|||||||
export {global as ɵglobal, looseIdentical as ɵlooseIdentical, stringify as ɵstringify} from './util';
|
export {global as ɵglobal, looseIdentical as ɵlooseIdentical, stringify as ɵstringify} from './util';
|
||||||
export {makeDecorator as ɵmakeDecorator} from './util/decorators';
|
export {makeDecorator as ɵmakeDecorator} from './util/decorators';
|
||||||
export {isObservable as ɵisObservable, isPromise as ɵisPromise} from './util/lang';
|
export {isObservable as ɵisObservable, isPromise as ɵisPromise} from './util/lang';
|
||||||
export {clearOverrides as ɵclearOverrides, overrideComponentView as ɵoverrideComponentView, overrideProvider as ɵoverrideProvider} from './view/index';
|
export {clearOverrides as ɵclearOverrides, initServicesIfNeeded as ɵinitServicesIfNeeded, overrideComponentView as ɵoverrideComponentView, overrideProvider as ɵoverrideProvider} from './view/index';
|
||||||
export {NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR as ɵNOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR} from './view/provider';
|
export {NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR as ɵNOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR} from './view/provider';
|
||||||
|
@ -209,7 +209,7 @@ export function defineComponent<T>(componentDefinition: {
|
|||||||
const type = componentDefinition.type;
|
const type = componentDefinition.type;
|
||||||
const pipeTypes = componentDefinition.pipes !;
|
const pipeTypes = componentDefinition.pipes !;
|
||||||
const directiveTypes = componentDefinition.directives !;
|
const directiveTypes = componentDefinition.directives !;
|
||||||
const declaredInputs: {[P in keyof T]: P} = {} as any;
|
const declaredInputs: {[key: string]: string} = {} as any;
|
||||||
const def: ComponentDefInternal<any> = {
|
const def: ComponentDefInternal<any> = {
|
||||||
type: type,
|
type: type,
|
||||||
diPublic: null,
|
diPublic: null,
|
||||||
|
@ -1525,7 +1525,7 @@ export function baseDirectiveCreate<T>(
|
|||||||
* @param tNode The static data for this node
|
* @param tNode The static data for this node
|
||||||
*/
|
*/
|
||||||
function setInputsFromAttrs<T>(
|
function setInputsFromAttrs<T>(
|
||||||
directiveIndex: number, instance: T, inputs: {[key: string]: string}, tNode: TNode): void {
|
directiveIndex: number, instance: T, inputs: {[P in keyof T]: string;}, tNode: TNode): void {
|
||||||
let initialInputData = tNode.initialInputs as InitialInputData | undefined;
|
let initialInputData = tNode.initialInputs as InitialInputData | undefined;
|
||||||
if (initialInputData === undefined || directiveIndex >= initialInputData.length) {
|
if (initialInputData === undefined || directiveIndex >= initialInputData.length) {
|
||||||
initialInputData = generateInitialInputs(directiveIndex, inputs, tNode);
|
initialInputData = generateInitialInputs(directiveIndex, inputs, tNode);
|
||||||
|
@ -84,7 +84,7 @@ export interface DirectiveDef<T, Selector extends string> {
|
|||||||
type: Type<T>;
|
type: Type<T>;
|
||||||
|
|
||||||
/** Function that makes a directive public to the DI system. */
|
/** Function that makes a directive public to the DI system. */
|
||||||
diPublic: ((def: DirectiveDef<any, string>) => void)|null;
|
diPublic: ((def: DirectiveDef<T, string>) => void)|null;
|
||||||
|
|
||||||
/** The selectors that will be used to match nodes to this directive. */
|
/** The selectors that will be used to match nodes to this directive. */
|
||||||
selectors: CssSelectorList;
|
selectors: CssSelectorList;
|
||||||
@ -94,7 +94,7 @@ export interface DirectiveDef<T, Selector extends string> {
|
|||||||
* are their aliases if any, or their original unminified property names
|
* are their aliases if any, or their original unminified property names
|
||||||
* (as in `@Input('alias') propertyName: any;`).
|
* (as in `@Input('alias') propertyName: any;`).
|
||||||
*/
|
*/
|
||||||
readonly inputs: {[P in keyof T]: P};
|
readonly inputs: {[P in keyof T]: string};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated This is only here because `NgOnChanges` incorrectly uses declared name instead of
|
* @deprecated This is only here because `NgOnChanges` incorrectly uses declared name instead of
|
||||||
|
@ -6,10 +6,6 @@
|
|||||||
* found in the LICENSE file at https://angular.io/license
|
* found in the LICENSE file at https://angular.io/license
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Import zero symbols from zone.js. This causes the zone ambient type to be
|
|
||||||
// added to the type-checker, without emitting any runtime module load statement
|
|
||||||
import {} from 'zone.js';
|
|
||||||
|
|
||||||
// TODO(jteplitz602): Load WorkerGlobalScope from lib.webworker.d.ts file #3492
|
// TODO(jteplitz602): Load WorkerGlobalScope from lib.webworker.d.ts file #3492
|
||||||
declare var WorkerGlobalScope: any /** TODO #9100 */;
|
declare var WorkerGlobalScope: any /** TODO #9100 */;
|
||||||
// CommonJS / Node have global context exposed as "global" variable.
|
// CommonJS / Node have global context exposed as "global" variable.
|
||||||
|
@ -6,9 +6,6 @@
|
|||||||
* found in the LICENSE file at https://angular.io/license
|
* found in the LICENSE file at https://angular.io/license
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Import zero symbols from zone.js. This causes the zone ambient type to be
|
|
||||||
// added to the type-checker, without emitting any runtime module load statement
|
|
||||||
import {} from 'zone.js';
|
|
||||||
import {EventEmitter} from '../event_emitter';
|
import {EventEmitter} from '../event_emitter';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -63,6 +63,14 @@ export function create(info: any /* ts.server.PluginCreateInfo */): ts.LanguageS
|
|||||||
tryCall(fileName, () => <T>(m.call(ls, fileName, p1, p2, p3, p4)));
|
tryCall(fileName, () => <T>(m.call(ls, fileName, p1, p2, p3, p4)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function tryFilenameFiveCall<T, P1, P2, P3, P4, P5>(
|
||||||
|
m: (fileName: string, p1: P1, p2: P2, p3: P3, p4: P4, p5: P5) =>
|
||||||
|
T): (fileName: string, p1: P1, p2: P2, p3: P3, p4: P4, p5: P5) => T {
|
||||||
|
return (fileName, p1, p2, p3, p4, p5) =>
|
||||||
|
tryCall(fileName, () => <T>(m.call(ls, fileName, p1, p2, p3, p4, p5)));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function typescriptOnly(ls: ts.LanguageService): ts.LanguageService {
|
function typescriptOnly(ls: ts.LanguageService): ts.LanguageService {
|
||||||
const languageService: ts.LanguageService = {
|
const languageService: ts.LanguageService = {
|
||||||
cleanupSemanticCache: () => ls.cleanupSemanticCache(),
|
cleanupSemanticCache: () => ls.cleanupSemanticCache(),
|
||||||
@ -74,7 +82,7 @@ export function create(info: any /* ts.server.PluginCreateInfo */): ts.LanguageS
|
|||||||
getEncodedSyntacticClassifications: tryFilenameOneCall(ls.getEncodedSyntacticClassifications),
|
getEncodedSyntacticClassifications: tryFilenameOneCall(ls.getEncodedSyntacticClassifications),
|
||||||
getEncodedSemanticClassifications: tryFilenameOneCall(ls.getEncodedSemanticClassifications),
|
getEncodedSemanticClassifications: tryFilenameOneCall(ls.getEncodedSemanticClassifications),
|
||||||
getCompletionsAtPosition: tryFilenameTwoCall(ls.getCompletionsAtPosition),
|
getCompletionsAtPosition: tryFilenameTwoCall(ls.getCompletionsAtPosition),
|
||||||
getCompletionEntryDetails: tryFilenameFourCall(ls.getCompletionEntryDetails),
|
getCompletionEntryDetails: tryFilenameFiveCall(ls.getCompletionEntryDetails),
|
||||||
getCompletionEntrySymbol: tryFilenameThreeCall(ls.getCompletionEntrySymbol),
|
getCompletionEntrySymbol: tryFilenameThreeCall(ls.getCompletionEntrySymbol),
|
||||||
getQuickInfoAtPosition: tryFilenameOneCall(ls.getQuickInfoAtPosition),
|
getQuickInfoAtPosition: tryFilenameOneCall(ls.getQuickInfoAtPosition),
|
||||||
getNameOrDottedNameSpan: tryFilenameTwoCall(ls.getNameOrDottedNameSpan),
|
getNameOrDottedNameSpan: tryFilenameTwoCall(ls.getNameOrDottedNameSpan),
|
||||||
@ -106,22 +114,28 @@ export function create(info: any /* ts.server.PluginCreateInfo */): ts.LanguageS
|
|||||||
getDocCommentTemplateAtPosition: tryFilenameOneCall(ls.getDocCommentTemplateAtPosition),
|
getDocCommentTemplateAtPosition: tryFilenameOneCall(ls.getDocCommentTemplateAtPosition),
|
||||||
isValidBraceCompletionAtPosition: tryFilenameTwoCall(ls.isValidBraceCompletionAtPosition),
|
isValidBraceCompletionAtPosition: tryFilenameTwoCall(ls.isValidBraceCompletionAtPosition),
|
||||||
getSpanOfEnclosingComment: tryFilenameTwoCall(ls.getSpanOfEnclosingComment),
|
getSpanOfEnclosingComment: tryFilenameTwoCall(ls.getSpanOfEnclosingComment),
|
||||||
getCodeFixesAtPosition: tryFilenameFourCall(ls.getCodeFixesAtPosition),
|
getCodeFixesAtPosition: tryFilenameFiveCall(ls.getCodeFixesAtPosition),
|
||||||
applyCodeActionCommand:
|
applyCodeActionCommand:
|
||||||
<any>((action: any) => tryCall(undefined, () => ls.applyCodeActionCommand(action))),
|
<any>((action: any) => tryCall(undefined, () => ls.applyCodeActionCommand(action))),
|
||||||
getEmitOutput: tryFilenameCall(ls.getEmitOutput),
|
getEmitOutput: tryFilenameCall(ls.getEmitOutput),
|
||||||
getProgram: () => ls.getProgram(),
|
getProgram: () => ls.getProgram(),
|
||||||
dispose: () => ls.dispose(),
|
dispose: () => ls.dispose(),
|
||||||
getApplicableRefactors: tryFilenameOneCall(ls.getApplicableRefactors),
|
getApplicableRefactors: tryFilenameTwoCall(ls.getApplicableRefactors),
|
||||||
getEditsForRefactor: tryFilenameFourCall(ls.getEditsForRefactor),
|
getEditsForRefactor: tryFilenameFiveCall(ls.getEditsForRefactor),
|
||||||
getDefinitionAndBoundSpan: tryFilenameOneCall(ls.getDefinitionAndBoundSpan),
|
getDefinitionAndBoundSpan: tryFilenameOneCall(ls.getDefinitionAndBoundSpan),
|
||||||
getCombinedCodeFix:
|
getCombinedCodeFix:
|
||||||
(scope: ts.CombinedCodeFixScope, fixId: {}, formatOptions: ts.FormatCodeSettings) =>
|
(scope: ts.CombinedCodeFixScope, fixId: {}, formatOptions: ts.FormatCodeSettings,
|
||||||
tryCall(undefined, () => ls.getCombinedCodeFix(scope, fixId, formatOptions)),
|
preferences: ts.UserPreferences) =>
|
||||||
|
tryCall(
|
||||||
|
undefined, () => ls.getCombinedCodeFix(scope, fixId, formatOptions, preferences)),
|
||||||
// TODO(kyliau): dummy implementation to compile with ts 2.8, create real one
|
// TODO(kyliau): dummy implementation to compile with ts 2.8, create real one
|
||||||
getSuggestionDiagnostics: (fileName: string) => [],
|
getSuggestionDiagnostics: (fileName: string) => [],
|
||||||
// TODO(kyliau): dummy implementation to compile with ts 2.8, create real one
|
// TODO(kyliau): dummy implementation to compile with ts 2.8, create real one
|
||||||
organizeImports: (scope: ts.CombinedCodeFixScope, formatOptions: ts.FormatCodeSettings) => [],
|
organizeImports: (scope: ts.CombinedCodeFixScope, formatOptions: ts.FormatCodeSettings) => [],
|
||||||
|
// TODO: dummy implementation to compile with ts 2.9, create a real one
|
||||||
|
getEditsForFileRename:
|
||||||
|
(oldFilePath: string, newFilePath: string, formatOptions: ts.FormatCodeSettings,
|
||||||
|
preferences: ts.UserPreferences | undefined) => []
|
||||||
} as ts.LanguageService;
|
} as ts.LanguageService;
|
||||||
return languageService;
|
return languageService;
|
||||||
}
|
}
|
||||||
|
@ -10,10 +10,6 @@ import {isPlatformServer} from '@angular/common';
|
|||||||
import {Inject, Injectable, NgZone, Optional, PLATFORM_ID} from '@angular/core';
|
import {Inject, Injectable, NgZone, Optional, PLATFORM_ID} from '@angular/core';
|
||||||
|
|
||||||
|
|
||||||
// Import zero symbols from zone.js. This causes the zone ambient type to be
|
|
||||||
// added to the type-checker, without emitting any runtime module load statement
|
|
||||||
import {} from 'zone.js';
|
|
||||||
|
|
||||||
import {DOCUMENT} from '../dom_tokens';
|
import {DOCUMENT} from '../dom_tokens';
|
||||||
|
|
||||||
import {EventManagerPlugin} from './event_manager';
|
import {EventManagerPlugin} from './event_manager';
|
||||||
|
@ -19,3 +19,4 @@ export {DomEventsPlugin as ɵDomEventsPlugin} from './dom/events/dom_events';
|
|||||||
export {HammerGesturesPlugin as ɵHammerGesturesPlugin} from './dom/events/hammer_gestures';
|
export {HammerGesturesPlugin as ɵHammerGesturesPlugin} from './dom/events/hammer_gestures';
|
||||||
export {KeyEventsPlugin as ɵKeyEventsPlugin} from './dom/events/key_events';
|
export {KeyEventsPlugin as ɵKeyEventsPlugin} from './dom/events/key_events';
|
||||||
export {DomSharedStylesHost as ɵDomSharedStylesHost, SharedStylesHost as ɵSharedStylesHost} from './dom/shared_styles_host';
|
export {DomSharedStylesHost as ɵDomSharedStylesHost, SharedStylesHost as ɵSharedStylesHost} from './dom/shared_styles_host';
|
||||||
|
export {DomSanitizerImpl as ɵDomSanitizerImpl} from './security/dom_sanitization_service';
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
|
|
||||||
import {Attribute, ChangeDetectorRef, ComponentFactoryResolver, ComponentRef, Directive, EventEmitter, Injector, OnDestroy, OnInit, Output, ViewContainerRef} from '@angular/core';
|
import {Attribute, ChangeDetectorRef, ComponentFactoryResolver, ComponentRef, Directive, EventEmitter, Injector, OnDestroy, OnInit, Output, ViewContainerRef} from '@angular/core';
|
||||||
|
|
||||||
|
import {Data} from '../config';
|
||||||
import {ChildrenOutletContexts} from '../router_outlet_context';
|
import {ChildrenOutletContexts} from '../router_outlet_context';
|
||||||
import {ActivatedRoute} from '../router_state';
|
import {ActivatedRoute} from '../router_state';
|
||||||
import {PRIMARY_OUTLET} from '../shared';
|
import {PRIMARY_OUTLET} from '../shared';
|
||||||
@ -83,7 +84,7 @@ export class RouterOutlet implements OnDestroy, OnInit {
|
|||||||
return this._activatedRoute as ActivatedRoute;
|
return this._activatedRoute as ActivatedRoute;
|
||||||
}
|
}
|
||||||
|
|
||||||
get activatedRouteData() {
|
get activatedRouteData(): Data {
|
||||||
if (this._activatedRoute) {
|
if (this._activatedRoute) {
|
||||||
return this._activatedRoute.snapshot.data;
|
return this._activatedRoute.snapshot.data;
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,7 @@ travisFoldEnd "test.unit.tools"
|
|||||||
|
|
||||||
# Run unit tests in node
|
# Run unit tests in node
|
||||||
travisFoldStart "test.unit.node"
|
travisFoldStart "test.unit.node"
|
||||||
node ./dist/tools/tsc-watch/ node runCmdsOnly
|
node --harmony ./dist/tools/tsc-watch/ node runCmdsOnly
|
||||||
travisFoldEnd "test.unit.node"
|
travisFoldEnd "test.unit.node"
|
||||||
|
|
||||||
|
|
||||||
|
2
test.sh
2
test.sh
@ -27,5 +27,5 @@ else
|
|||||||
echo "Creating packages .metadata.json files..."
|
echo "Creating packages .metadata.json files..."
|
||||||
node --max-old-space-size=3000 dist/tools/@angular/compiler-cli/src/main -p packages/tsconfig-metadata.json
|
node --max-old-space-size=3000 dist/tools/@angular/compiler-cli/src/main -p packages/tsconfig-metadata.json
|
||||||
fi
|
fi
|
||||||
node dist/tools/tsc-watch/ $1 watch $2
|
node --harmony dist/tools/tsc-watch/ $1 watch $2
|
||||||
fi
|
fi
|
||||||
|
@ -60,6 +60,8 @@ var specFiles: any =
|
|||||||
'@angular/examples/**',
|
'@angular/examples/**',
|
||||||
'@angular/platform-browser/**',
|
'@angular/platform-browser/**',
|
||||||
'@angular/platform-browser-dynamic/**',
|
'@angular/platform-browser-dynamic/**',
|
||||||
|
'@angular/compiler/test/aot/**',
|
||||||
|
'@angular/compiler/test/render3/**',
|
||||||
'@angular/core/test/bundling/**',
|
'@angular/core/test/bundling/**',
|
||||||
'@angular/core/test/zone/**',
|
'@angular/core/test/zone/**',
|
||||||
'@angular/core/test/render3/**',
|
'@angular/core/test/render3/**',
|
||||||
|
@ -2,7 +2,7 @@ export declare function animate(timings: string | number, styles?: AnimationStyl
|
|||||||
|
|
||||||
export declare function animateChild(options?: AnimateChildOptions | null): AnimationAnimateChildMetadata;
|
export declare function animateChild(options?: AnimateChildOptions | null): AnimationAnimateChildMetadata;
|
||||||
|
|
||||||
export interface AnimateChildOptions extends AnimationOptions {
|
export declare interface AnimateChildOptions extends AnimationOptions {
|
||||||
duration?: number | string;
|
duration?: number | string;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -75,10 +75,10 @@ export declare const enum AnimationMetadataType {
|
|||||||
AnimateChild = 9,
|
AnimateChild = 9,
|
||||||
AnimateRef = 10,
|
AnimateRef = 10,
|
||||||
Query = 11,
|
Query = 11,
|
||||||
Stagger = 12,
|
Stagger = 12
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface AnimationOptions {
|
export declare interface AnimationOptions {
|
||||||
delay?: number | string;
|
delay?: number | string;
|
||||||
params?: {
|
params?: {
|
||||||
[name: string]: any;
|
[name: string]: any;
|
||||||
@ -102,7 +102,7 @@ export interface AnimationPlayer {
|
|||||||
play(): void;
|
play(): void;
|
||||||
reset(): void;
|
reset(): void;
|
||||||
restart(): void;
|
restart(): void;
|
||||||
setPosition(p: any): void;
|
setPosition(p: any /** TODO #9100 */): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface AnimationQueryMetadata extends AnimationMetadata {
|
export interface AnimationQueryMetadata extends AnimationMetadata {
|
||||||
@ -111,7 +111,7 @@ export interface AnimationQueryMetadata extends AnimationMetadata {
|
|||||||
selector: string;
|
selector: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface AnimationQueryOptions extends AnimationOptions {
|
export declare interface AnimationQueryOptions extends AnimationOptions {
|
||||||
limit?: number;
|
limit?: number;
|
||||||
optional?: boolean;
|
optional?: boolean;
|
||||||
}
|
}
|
||||||
|
24
tools/public_api_guard/common/common.d.ts
vendored
24
tools/public_api_guard/common/common.d.ts
vendored
@ -3,8 +3,8 @@ export declare const APP_BASE_HREF: InjectionToken<string>;
|
|||||||
export declare class AsyncPipe implements OnDestroy, PipeTransform {
|
export declare class AsyncPipe implements OnDestroy, PipeTransform {
|
||||||
constructor(_ref: ChangeDetectorRef);
|
constructor(_ref: ChangeDetectorRef);
|
||||||
ngOnDestroy(): void;
|
ngOnDestroy(): void;
|
||||||
transform<T>(obj: Promise<T> | null | undefined): T | null;
|
|
||||||
transform<T>(obj: Observable<T> | null | undefined): T | null;
|
transform<T>(obj: Observable<T> | null | undefined): T | null;
|
||||||
|
transform<T>(obj: Promise<T> | null | undefined): T | null;
|
||||||
transform<T>(obj: undefined): undefined;
|
transform<T>(obj: undefined): undefined;
|
||||||
transform<T>(obj: null): null;
|
transform<T>(obj: null): null;
|
||||||
}
|
}
|
||||||
@ -66,13 +66,13 @@ export declare enum FormatWidth {
|
|||||||
Short = 0,
|
Short = 0,
|
||||||
Medium = 1,
|
Medium = 1,
|
||||||
Long = 2,
|
Long = 2,
|
||||||
Full = 3,
|
Full = 3
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @experimental */
|
/** @experimental */
|
||||||
export declare enum FormStyle {
|
export declare enum FormStyle {
|
||||||
Format = 0,
|
Format = 0,
|
||||||
Standalone = 1,
|
Standalone = 1
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @experimental */
|
/** @experimental */
|
||||||
@ -291,7 +291,7 @@ export declare class NgIfContext {
|
|||||||
|
|
||||||
/** @experimental */
|
/** @experimental */
|
||||||
export declare class NgLocaleLocalization extends NgLocalization {
|
export declare class NgLocaleLocalization extends NgLocalization {
|
||||||
/** @deprecated */ protected deprecatedPluralFn: ((locale: string, value: string | number) => Plural) | null | undefined;
|
/** @deprecated */ protected deprecatedPluralFn?: ((locale: string, value: string | number) => Plural) | null | undefined;
|
||||||
protected locale: string;
|
protected locale: string;
|
||||||
constructor(locale: string,
|
constructor(locale: string,
|
||||||
/** @deprecated */ deprecatedPluralFn?: ((locale: string, value: string | number) => Plural) | null | undefined);
|
/** @deprecated */ deprecatedPluralFn?: ((locale: string, value: string | number) => Plural) | null | undefined);
|
||||||
@ -350,7 +350,7 @@ export declare enum NumberFormatStyle {
|
|||||||
Decimal = 0,
|
Decimal = 0,
|
||||||
Percent = 1,
|
Percent = 1,
|
||||||
Currency = 2,
|
Currency = 2,
|
||||||
Scientific = 3,
|
Scientific = 3
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @experimental */
|
/** @experimental */
|
||||||
@ -368,7 +368,7 @@ export declare enum NumberSymbol {
|
|||||||
NaN = 10,
|
NaN = 10,
|
||||||
TimeSeparator = 11,
|
TimeSeparator = 11,
|
||||||
CurrencyDecimal = 12,
|
CurrencyDecimal = 12,
|
||||||
CurrencyGroup = 13,
|
CurrencyGroup = 13
|
||||||
}
|
}
|
||||||
|
|
||||||
export declare class PathLocationStrategy extends LocationStrategy {
|
export declare class PathLocationStrategy extends LocationStrategy {
|
||||||
@ -389,9 +389,9 @@ export declare class PercentPipe implements PipeTransform {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export declare abstract class PlatformLocation {
|
export declare abstract class PlatformLocation {
|
||||||
readonly abstract hash: string;
|
abstract readonly hash: string;
|
||||||
readonly abstract pathname: string;
|
abstract readonly pathname: string;
|
||||||
readonly abstract search: string;
|
abstract readonly search: string;
|
||||||
abstract back(): void;
|
abstract back(): void;
|
||||||
abstract forward(): void;
|
abstract forward(): void;
|
||||||
abstract getBaseHrefFromDOM(): string;
|
abstract getBaseHrefFromDOM(): string;
|
||||||
@ -408,7 +408,7 @@ export declare enum Plural {
|
|||||||
Two = 2,
|
Two = 2,
|
||||||
Few = 3,
|
Few = 3,
|
||||||
Many = 4,
|
Many = 4,
|
||||||
Other = 5,
|
Other = 5
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @experimental */
|
/** @experimental */
|
||||||
@ -441,7 +441,7 @@ export declare enum TranslationWidth {
|
|||||||
Narrow = 0,
|
Narrow = 0,
|
||||||
Abbreviated = 1,
|
Abbreviated = 1,
|
||||||
Wide = 2,
|
Wide = 2,
|
||||||
Short = 3,
|
Short = 3
|
||||||
}
|
}
|
||||||
|
|
||||||
export declare class UpperCasePipe implements PipeTransform {
|
export declare class UpperCasePipe implements PipeTransform {
|
||||||
@ -467,5 +467,5 @@ export declare enum WeekDay {
|
|||||||
Wednesday = 3,
|
Wednesday = 3,
|
||||||
Thursday = 4,
|
Thursday = 4,
|
||||||
Friday = 5,
|
Friday = 5,
|
||||||
Saturday = 6,
|
Saturday = 6
|
||||||
}
|
}
|
||||||
|
2
tools/public_api_guard/common/http.d.ts
vendored
2
tools/public_api_guard/common/http.d.ts
vendored
@ -1516,7 +1516,7 @@ export declare enum HttpEventType {
|
|||||||
ResponseHeader = 2,
|
ResponseHeader = 2,
|
||||||
DownloadProgress = 3,
|
DownloadProgress = 3,
|
||||||
Response = 4,
|
Response = 4,
|
||||||
User = 5,
|
User = 5
|
||||||
}
|
}
|
||||||
|
|
||||||
export declare abstract class HttpHandler {
|
export declare abstract class HttpHandler {
|
||||||
|
66
tools/public_api_guard/core/core.d.ts
vendored
66
tools/public_api_guard/core/core.d.ts
vendored
@ -59,7 +59,7 @@ export declare const Attribute: AttributeDecorator;
|
|||||||
|
|
||||||
export declare enum ChangeDetectionStrategy {
|
export declare enum ChangeDetectionStrategy {
|
||||||
OnPush = 0,
|
OnPush = 0,
|
||||||
Default = 1,
|
Default = 1
|
||||||
}
|
}
|
||||||
|
|
||||||
export declare abstract class ChangeDetectorRef {
|
export declare abstract class ChangeDetectorRef {
|
||||||
@ -114,17 +114,17 @@ export interface ComponentDecorator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export declare abstract class ComponentFactory<C> {
|
export declare abstract class ComponentFactory<C> {
|
||||||
readonly abstract componentType: Type<any>;
|
abstract readonly componentType: Type<any>;
|
||||||
readonly abstract inputs: {
|
abstract readonly inputs: {
|
||||||
propName: string;
|
propName: string;
|
||||||
templateName: string;
|
templateName: string;
|
||||||
}[];
|
}[];
|
||||||
readonly abstract ngContentSelectors: string[];
|
abstract readonly ngContentSelectors: string[];
|
||||||
readonly abstract outputs: {
|
abstract readonly outputs: {
|
||||||
propName: string;
|
propName: string;
|
||||||
templateName: string;
|
templateName: string;
|
||||||
}[];
|
}[];
|
||||||
readonly abstract selector: string;
|
abstract readonly selector: string;
|
||||||
abstract create(injector: Injector, projectableNodes?: any[][], rootSelectorOrNode?: string | any, ngModule?: NgModuleRef<any>): ComponentRef<C>;
|
abstract create(injector: Injector, projectableNodes?: any[][], rootSelectorOrNode?: string | any, ngModule?: NgModuleRef<any>): ComponentRef<C>;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -134,12 +134,12 @@ export declare abstract class ComponentFactoryResolver {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export declare abstract class ComponentRef<C> {
|
export declare abstract class ComponentRef<C> {
|
||||||
readonly abstract changeDetectorRef: ChangeDetectorRef;
|
abstract readonly changeDetectorRef: ChangeDetectorRef;
|
||||||
readonly abstract componentType: Type<any>;
|
abstract readonly componentType: Type<any>;
|
||||||
readonly abstract hostView: ViewRef;
|
abstract readonly hostView: ViewRef;
|
||||||
readonly abstract injector: Injector;
|
abstract readonly injector: Injector;
|
||||||
readonly abstract instance: C;
|
abstract readonly instance: C;
|
||||||
readonly abstract location: ElementRef;
|
abstract readonly location: ElementRef;
|
||||||
abstract destroy(): void;
|
abstract destroy(): void;
|
||||||
abstract onDestroy(callback: Function): void;
|
abstract onDestroy(callback: Function): void;
|
||||||
}
|
}
|
||||||
@ -280,8 +280,8 @@ export declare class ElementRef<T = any> {
|
|||||||
|
|
||||||
/** @experimental */
|
/** @experimental */
|
||||||
export declare abstract class EmbeddedViewRef<C> extends ViewRef {
|
export declare abstract class EmbeddedViewRef<C> extends ViewRef {
|
||||||
readonly abstract context: C;
|
abstract readonly context: C;
|
||||||
readonly abstract rootNodes: any[];
|
abstract readonly rootNodes: any[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export declare function enableProdMode(): void;
|
export declare function enableProdMode(): void;
|
||||||
@ -378,7 +378,7 @@ export declare const enum InjectFlags {
|
|||||||
Host = 1,
|
Host = 1,
|
||||||
Self = 2,
|
Self = 2,
|
||||||
SkipSelf = 4,
|
SkipSelf = 4,
|
||||||
Optional = 8,
|
Optional = 8
|
||||||
}
|
}
|
||||||
|
|
||||||
export declare class InjectionToken<T> {
|
export declare class InjectionToken<T> {
|
||||||
@ -494,7 +494,7 @@ export declare const LOCALE_ID: InjectionToken<string>;
|
|||||||
export declare enum MissingTranslationStrategy {
|
export declare enum MissingTranslationStrategy {
|
||||||
Error = 0,
|
Error = 0,
|
||||||
Warning = 1,
|
Warning = 1,
|
||||||
Ignore = 2,
|
Ignore = 2
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @experimental */
|
/** @experimental */
|
||||||
@ -515,7 +515,7 @@ export declare const NgModule: NgModuleDecorator;
|
|||||||
|
|
||||||
/** @experimental */
|
/** @experimental */
|
||||||
export declare abstract class NgModuleFactory<T> {
|
export declare abstract class NgModuleFactory<T> {
|
||||||
readonly abstract moduleType: Type<T>;
|
abstract readonly moduleType: Type<T>;
|
||||||
abstract create(parentInjector: Injector | null): NgModuleRef<T>;
|
abstract create(parentInjector: Injector | null): NgModuleRef<T>;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -524,9 +524,9 @@ export declare abstract class NgModuleFactoryLoader {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export declare abstract class NgModuleRef<T> {
|
export declare abstract class NgModuleRef<T> {
|
||||||
readonly abstract componentFactoryResolver: ComponentFactoryResolver;
|
abstract readonly componentFactoryResolver: ComponentFactoryResolver;
|
||||||
readonly abstract injector: Injector;
|
abstract readonly injector: Injector;
|
||||||
readonly abstract instance: T;
|
abstract readonly instance: T;
|
||||||
abstract destroy(): void;
|
abstract destroy(): void;
|
||||||
abstract onDestroy(callback: () => void): void;
|
abstract onDestroy(callback: () => void): void;
|
||||||
}
|
}
|
||||||
@ -547,7 +547,7 @@ export declare class NgZone {
|
|||||||
readonly onMicrotaskEmpty: EventEmitter<any>;
|
readonly onMicrotaskEmpty: EventEmitter<any>;
|
||||||
readonly onStable: EventEmitter<any>;
|
readonly onStable: EventEmitter<any>;
|
||||||
readonly onUnstable: EventEmitter<any>;
|
readonly onUnstable: EventEmitter<any>;
|
||||||
constructor({enableLongStackTrace}: {
|
constructor({ enableLongStackTrace }: {
|
||||||
enableLongStackTrace?: boolean;
|
enableLongStackTrace?: boolean;
|
||||||
});
|
});
|
||||||
run<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any[]): T;
|
run<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any[]): T;
|
||||||
@ -642,7 +642,7 @@ export declare class QueryList<T> {
|
|||||||
|
|
||||||
/** @deprecated */
|
/** @deprecated */
|
||||||
export declare abstract class ReflectiveInjector implements Injector {
|
export declare abstract class ReflectiveInjector implements Injector {
|
||||||
readonly abstract parent: Injector | null;
|
abstract readonly parent: Injector | null;
|
||||||
abstract createChildFromResolved(providers: ResolvedReflectiveProvider[]): ReflectiveInjector;
|
abstract createChildFromResolved(providers: ResolvedReflectiveProvider[]): ReflectiveInjector;
|
||||||
abstract get(token: any, notFoundValue?: any): any;
|
abstract get(token: any, notFoundValue?: any): any;
|
||||||
abstract instantiateResolved(provider: ResolvedReflectiveProvider): any;
|
abstract instantiateResolved(provider: ResolvedReflectiveProvider): any;
|
||||||
@ -699,7 +699,7 @@ export declare abstract class Renderer {
|
|||||||
|
|
||||||
/** @experimental */
|
/** @experimental */
|
||||||
export declare abstract class Renderer2 {
|
export declare abstract class Renderer2 {
|
||||||
readonly abstract data: {
|
abstract readonly data: {
|
||||||
[key: string]: any;
|
[key: string]: any;
|
||||||
};
|
};
|
||||||
destroyNode: ((node: any) => void) | null;
|
destroyNode: ((node: any) => void) | null;
|
||||||
@ -735,7 +735,7 @@ export declare abstract class RendererFactory2 {
|
|||||||
/** @experimental */
|
/** @experimental */
|
||||||
export declare enum RendererStyleFlags2 {
|
export declare enum RendererStyleFlags2 {
|
||||||
Important = 1,
|
Important = 1,
|
||||||
DashCase = 2,
|
DashCase = 2
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @experimental */
|
/** @experimental */
|
||||||
@ -787,7 +787,7 @@ export declare enum SecurityContext {
|
|||||||
STYLE = 2,
|
STYLE = 2,
|
||||||
SCRIPT = 3,
|
SCRIPT = 3,
|
||||||
URL = 4,
|
URL = 4,
|
||||||
RESOURCE_URL = 5,
|
RESOURCE_URL = 5
|
||||||
}
|
}
|
||||||
|
|
||||||
export declare const Self: SelfDecorator;
|
export declare const Self: SelfDecorator;
|
||||||
@ -834,7 +834,7 @@ export declare abstract class SystemJsNgModuleLoaderConfig {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export declare abstract class TemplateRef<C> {
|
export declare abstract class TemplateRef<C> {
|
||||||
readonly abstract elementRef: ElementRef;
|
abstract readonly elementRef: ElementRef;
|
||||||
abstract createEmbeddedView(context: C): EmbeddedViewRef<C>;
|
abstract createEmbeddedView(context: C): EmbeddedViewRef<C>;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -919,10 +919,10 @@ export interface ViewChildrenDecorator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export declare abstract class ViewContainerRef {
|
export declare abstract class ViewContainerRef {
|
||||||
readonly abstract element: ElementRef;
|
abstract readonly element: ElementRef;
|
||||||
readonly abstract injector: Injector;
|
abstract readonly injector: Injector;
|
||||||
readonly abstract length: number;
|
abstract readonly length: number;
|
||||||
readonly abstract parentInjector: Injector;
|
abstract readonly parentInjector: Injector;
|
||||||
abstract clear(): void;
|
abstract clear(): void;
|
||||||
abstract createComponent<C>(componentFactory: ComponentFactory<C>, index?: number, injector?: Injector, projectableNodes?: any[][], ngModule?: NgModuleRef<any>): ComponentRef<C>;
|
abstract createComponent<C>(componentFactory: ComponentFactory<C>, index?: number, injector?: Injector, projectableNodes?: any[][], ngModule?: NgModuleRef<any>): ComponentRef<C>;
|
||||||
abstract createEmbeddedView<C>(templateRef: TemplateRef<C>, context?: C, index?: number): EmbeddedViewRef<C>;
|
abstract createEmbeddedView<C>(templateRef: TemplateRef<C>, context?: C, index?: number): EmbeddedViewRef<C>;
|
||||||
@ -938,13 +938,13 @@ export declare enum ViewEncapsulation {
|
|||||||
Emulated = 0,
|
Emulated = 0,
|
||||||
Native = 1,
|
Native = 1,
|
||||||
None = 2,
|
None = 2,
|
||||||
ShadowDom = 3,
|
ShadowDom = 3
|
||||||
}
|
}
|
||||||
|
|
||||||
export declare abstract class ViewRef extends ChangeDetectorRef {
|
export declare abstract class ViewRef extends ChangeDetectorRef {
|
||||||
readonly abstract destroyed: boolean;
|
abstract readonly destroyed: boolean;
|
||||||
abstract destroy(): void;
|
abstract destroy(): void;
|
||||||
abstract onDestroy(callback: Function): any;
|
abstract onDestroy(callback: Function): any /** TODO #9100 */;
|
||||||
}
|
}
|
||||||
|
|
||||||
export declare class WrappedValue {
|
export declare class WrappedValue {
|
||||||
|
12
tools/public_api_guard/core/testing.d.ts
vendored
12
tools/public_api_guard/core/testing.d.ts
vendored
@ -78,13 +78,13 @@ export declare class TestBed implements Injector {
|
|||||||
}): void;
|
}): void;
|
||||||
configureTestingModule(moduleDef: TestModuleMetadata): void;
|
configureTestingModule(moduleDef: TestModuleMetadata): void;
|
||||||
createComponent<T>(component: Type<T>): ComponentFixture<T>;
|
createComponent<T>(component: Type<T>): ComponentFixture<T>;
|
||||||
deprecatedOverrideProvider(token: any, provider: {
|
|
||||||
useValue: any;
|
|
||||||
}): void;
|
|
||||||
/** @deprecated */ deprecatedOverrideProvider(token: any, provider: {
|
/** @deprecated */ deprecatedOverrideProvider(token: any, provider: {
|
||||||
useFactory: Function;
|
useFactory: Function;
|
||||||
deps: any[];
|
deps: any[];
|
||||||
}): void;
|
}): void;
|
||||||
|
deprecatedOverrideProvider(token: any, provider: {
|
||||||
|
useValue: any;
|
||||||
|
}): void;
|
||||||
execute(tokens: any[], fn: Function, context?: any): any;
|
execute(tokens: any[], fn: Function, context?: any): any;
|
||||||
get(token: any, notFoundValue?: any): any;
|
get(token: any, notFoundValue?: any): any;
|
||||||
/** @experimental */ initTestEnvironment(ngModule: Type<any> | Type<any>[], platform: PlatformRef, aotSummaries?: () => any[]): void;
|
/** @experimental */ initTestEnvironment(ngModule: Type<any> | Type<any>[], platform: PlatformRef, aotSummaries?: () => any[]): void;
|
||||||
@ -123,11 +123,11 @@ export declare class TestBed implements Injector {
|
|||||||
static overrideModule(ngModule: Type<any>, override: MetadataOverride<NgModule>): typeof TestBed;
|
static overrideModule(ngModule: Type<any>, override: MetadataOverride<NgModule>): typeof TestBed;
|
||||||
static overridePipe(pipe: Type<any>, override: MetadataOverride<Pipe>): typeof TestBed;
|
static overridePipe(pipe: Type<any>, override: MetadataOverride<Pipe>): typeof TestBed;
|
||||||
static overrideProvider(token: any, provider: {
|
static overrideProvider(token: any, provider: {
|
||||||
useFactory: Function;
|
useValue: any;
|
||||||
deps: any[];
|
|
||||||
}): typeof TestBed;
|
}): typeof TestBed;
|
||||||
static overrideProvider(token: any, provider: {
|
static overrideProvider(token: any, provider: {
|
||||||
useValue: any;
|
useFactory: Function;
|
||||||
|
deps: any[];
|
||||||
}): typeof TestBed;
|
}): typeof TestBed;
|
||||||
static overrideTemplate(component: Type<any>, template: string): typeof TestBed;
|
static overrideTemplate(component: Type<any>, template: string): typeof TestBed;
|
||||||
static overrideTemplateUsingTestingModule(component: Type<any>, template: string): typeof TestBed;
|
static overrideTemplateUsingTestingModule(component: Type<any>, template: string): typeof TestBed;
|
||||||
|
2
tools/public_api_guard/forms/forms.d.ts
vendored
2
tools/public_api_guard/forms/forms.d.ts
vendored
@ -64,7 +64,7 @@ export declare abstract class AbstractControl {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export declare abstract class AbstractControlDirective {
|
export declare abstract class AbstractControlDirective {
|
||||||
readonly abstract control: AbstractControl | null;
|
abstract readonly control: AbstractControl | null;
|
||||||
readonly dirty: boolean | null;
|
readonly dirty: boolean | null;
|
||||||
readonly disabled: boolean | null;
|
readonly disabled: boolean | null;
|
||||||
readonly enabled: boolean | null;
|
readonly enabled: boolean | null;
|
||||||
|
10
tools/public_api_guard/http/http.d.ts
vendored
10
tools/public_api_guard/http/http.d.ts
vendored
@ -108,7 +108,7 @@ export declare enum ReadyState {
|
|||||||
HeadersReceived = 2,
|
HeadersReceived = 2,
|
||||||
Loading = 3,
|
Loading = 3,
|
||||||
Done = 4,
|
Done = 4,
|
||||||
Cancelled = 5,
|
Cancelled = 5
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @deprecated */
|
/** @deprecated */
|
||||||
@ -132,7 +132,7 @@ export declare enum RequestMethod {
|
|||||||
Delete = 3,
|
Delete = 3,
|
||||||
Options = 4,
|
Options = 4,
|
||||||
Head = 5,
|
Head = 5,
|
||||||
Patch = 6,
|
Patch = 6
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @deprecated */
|
/** @deprecated */
|
||||||
@ -184,7 +184,7 @@ export declare enum ResponseContentType {
|
|||||||
Text = 0,
|
Text = 0,
|
||||||
Json = 1,
|
Json = 1,
|
||||||
ArrayBuffer = 2,
|
ArrayBuffer = 2,
|
||||||
Blob = 3,
|
Blob = 3
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @deprecated */
|
/** @deprecated */
|
||||||
@ -213,7 +213,7 @@ export declare enum ResponseType {
|
|||||||
Cors = 1,
|
Cors = 1,
|
||||||
Default = 2,
|
Default = 2,
|
||||||
Error = 3,
|
Error = 3,
|
||||||
Opaque = 4,
|
Opaque = 4
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @deprecated */
|
/** @deprecated */
|
||||||
@ -249,7 +249,7 @@ export declare class XHRConnection implements Connection {
|
|||||||
request: Request;
|
request: Request;
|
||||||
response: Observable<Response>;
|
response: Observable<Response>;
|
||||||
constructor(req: Request, browserXHR: BrowserXhr, baseResponseOptions?: ResponseOptions);
|
constructor(req: Request, browserXHR: BrowserXhr, baseResponseOptions?: ResponseOptions);
|
||||||
setDetectedContentType(req: any, _xhr: any): void;
|
setDetectedContentType(req: any /** TODO Request */, _xhr: any /** XMLHttpRequest */): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @deprecated */
|
/** @deprecated */
|
||||||
|
@ -58,7 +58,7 @@ export interface ReceivedMessage {
|
|||||||
export declare const enum SerializerTypes {
|
export declare const enum SerializerTypes {
|
||||||
RENDERER_TYPE_2 = 0,
|
RENDERER_TYPE_2 = 0,
|
||||||
PRIMITIVE = 1,
|
PRIMITIVE = 1,
|
||||||
RENDER_STORE_OBJECT = 2,
|
RENDER_STORE_OBJECT = 2
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @experimental */
|
/** @experimental */
|
||||||
@ -73,7 +73,7 @@ export declare class ServiceMessageBrokerFactory {
|
|||||||
|
|
||||||
/** @experimental */
|
/** @experimental */
|
||||||
export declare class UiArguments {
|
export declare class UiArguments {
|
||||||
args: FnArg[] | undefined;
|
args?: FnArg[] | undefined;
|
||||||
method: string;
|
method: string;
|
||||||
constructor(method: string, args?: FnArg[] | undefined);
|
constructor(method: string, args?: FnArg[] | undefined);
|
||||||
}
|
}
|
||||||
|
4
tools/public_api_guard/router/router.d.ts
vendored
4
tools/public_api_guard/router/router.d.ts
vendored
@ -417,9 +417,7 @@ export declare class RouterModule {
|
|||||||
export declare class RouterOutlet implements OnDestroy, OnInit {
|
export declare class RouterOutlet implements OnDestroy, OnInit {
|
||||||
activateEvents: EventEmitter<any>;
|
activateEvents: EventEmitter<any>;
|
||||||
readonly activatedRoute: ActivatedRoute;
|
readonly activatedRoute: ActivatedRoute;
|
||||||
readonly activatedRouteData: {
|
readonly activatedRouteData: Data;
|
||||||
[name: string]: any;
|
|
||||||
};
|
|
||||||
readonly component: Object;
|
readonly component: Object;
|
||||||
deactivateEvents: EventEmitter<any>;
|
deactivateEvents: EventEmitter<any>;
|
||||||
readonly isActivated: boolean;
|
readonly isActivated: boolean;
|
||||||
|
@ -32,8 +32,11 @@ const runMode: string = process.argv.length >= 4 ? process.argv[3] : null;
|
|||||||
const debugMode = process.argv.some(arg => arg === '--debug');
|
const debugMode = process.argv.some(arg => arg === '--debug');
|
||||||
const BaseConfig = {
|
const BaseConfig = {
|
||||||
start: 'File change detected. Starting incremental compilation...',
|
start: 'File change detected. Starting incremental compilation...',
|
||||||
error: 'error',
|
// This regex uses a negative lookbehind group (?<! 0 ), which causes it to not match a string
|
||||||
complete: 'Compilation complete. Watching for file changes.'
|
// containing " 0 error" but to match anything else containing "error". It requires the --harmony
|
||||||
|
// flag to run under node versions < 9.
|
||||||
|
error: /(?<! 0 )error/,
|
||||||
|
complete: 'Found 0 errors. Watching for file changes.',
|
||||||
};
|
};
|
||||||
|
|
||||||
if (platform == 'node') {
|
if (platform == 'node') {
|
||||||
|
19
yarn.lock
19
yarn.lock
@ -3264,6 +3264,12 @@ jasmine-core@~2.8.0:
|
|||||||
version "2.8.0"
|
version "2.8.0"
|
||||||
resolved "https://registry.yarnpkg.com/jasmine-core/-/jasmine-core-2.8.0.tgz#bcc979ae1f9fd05701e45e52e65d3a5d63f1a24e"
|
resolved "https://registry.yarnpkg.com/jasmine-core/-/jasmine-core-2.8.0.tgz#bcc979ae1f9fd05701e45e52e65d3a5d63f1a24e"
|
||||||
|
|
||||||
|
jasmine-diff@^0.1.3:
|
||||||
|
version "0.1.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/jasmine-diff/-/jasmine-diff-0.1.3.tgz#93ccc2dcc41028c5ddd4606558074839f2deeaa8"
|
||||||
|
dependencies:
|
||||||
|
diff "^3.2.0"
|
||||||
|
|
||||||
jasmine@2.4.1:
|
jasmine@2.4.1:
|
||||||
version "2.4.1"
|
version "2.4.1"
|
||||||
resolved "https://registry.yarnpkg.com/jasmine/-/jasmine-2.4.1.tgz#9016dda453213d27ac6d43dc4ea97315a189085e"
|
resolved "https://registry.yarnpkg.com/jasmine/-/jasmine-2.4.1.tgz#9016dda453213d27ac6d43dc4ea97315a189085e"
|
||||||
@ -5907,10 +5913,11 @@ trim-off-newlines@^1.0.0:
|
|||||||
version "1.0.1"
|
version "1.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/trim-off-newlines/-/trim-off-newlines-1.0.1.tgz#9f9ba9d9efa8764c387698bcbfeb2c848f11adb3"
|
resolved "https://registry.yarnpkg.com/trim-off-newlines/-/trim-off-newlines-1.0.1.tgz#9f9ba9d9efa8764c387698bcbfeb2c848f11adb3"
|
||||||
|
|
||||||
tsickle@^0.29.0:
|
tsickle@0.32:
|
||||||
version "0.29.0"
|
version "0.32.0"
|
||||||
resolved "https://registry.yarnpkg.com/tsickle/-/tsickle-0.29.0.tgz#812806554bb46c1aa16eb0fe2a051da95ca8f5a4"
|
resolved "https://registry.yarnpkg.com/tsickle/-/tsickle-0.32.0.tgz#8027eecf5872b4451ffae821a5fdbd0b3206c139"
|
||||||
dependencies:
|
dependencies:
|
||||||
|
jasmine-diff "^0.1.3"
|
||||||
minimist "^1.2.0"
|
minimist "^1.2.0"
|
||||||
mkdirp "^0.5.1"
|
mkdirp "^0.5.1"
|
||||||
source-map "^0.6.0"
|
source-map "^0.6.0"
|
||||||
@ -6010,9 +6017,9 @@ typedarray@^0.0.6:
|
|||||||
version "0.0.6"
|
version "0.0.6"
|
||||||
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
|
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
|
||||||
|
|
||||||
typescript@2.8.x:
|
typescript@2.9.x:
|
||||||
version "2.8.3"
|
version "2.9.2"
|
||||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.8.3.tgz#5d817f9b6f31bb871835f4edf0089f21abe6c170"
|
resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.9.2.tgz#1cbf61d05d6b96269244eb6a3bce4bd914e0f00c"
|
||||||
|
|
||||||
typescript@~2.6.2:
|
typescript@~2.6.2:
|
||||||
version "2.6.2"
|
version "2.6.2"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user