build: turn on tsc's stripInternal when producint public d.ts file
I also made some changes to fix imports and remove some stuff that caused breakage once stripInternals was turned on.
This commit is contained in:
parent
7bfe8aa553
commit
0035575c82
|
@ -10,5 +10,4 @@ export {NgTemplateOutlet} from './directives/ng_template_outlet';
|
|||
export {NgStyle} from './directives/ng_style';
|
||||
export {NgSwitch, NgSwitchWhen, NgSwitchDefault} from './directives/ng_switch';
|
||||
export {NgPlural, NgPluralCase, NgLocalization} from './directives/ng_plural';
|
||||
export * from './directives/observable_list_diff';
|
||||
export {CORE_DIRECTIVES} from './directives/core_directives';
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
// TS does not have Observables
|
||||
|
||||
// I need to be here to make TypeScript think this is a module.
|
||||
import {} from '../../src/facade/lang';
|
||||
|
||||
/**
|
||||
* This module exists in Dart, but not in Typescript. This exported symbol
|
||||
* is only here to help Typescript think this is a module.
|
||||
* @internal
|
||||
*/
|
||||
export var workaround_empty_observable_list_diff: any;
|
|
@ -1,5 +1,5 @@
|
|||
import {Injectable, Inject} from '@angular/core';
|
||||
import {EventEmitter, ObservableWrapper} from '../../src/facade/async';
|
||||
import {Injectable, EventEmitter} from '@angular/core';
|
||||
import {ObservableWrapper} from '../../src/facade/async';
|
||||
|
||||
import {LocationStrategy} from './location_strategy';
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
"compilerOptions": {
|
||||
"baseUrl": ".",
|
||||
"declaration": true,
|
||||
"stripInternal": true,
|
||||
"emitDecoratorMetadata": true,
|
||||
"experimentalDecorators": true,
|
||||
"module": "es2015",
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
"compilerOptions": {
|
||||
"baseUrl": ".",
|
||||
"declaration": true,
|
||||
"stripInternal": true,
|
||||
"emitDecoratorMetadata": true,
|
||||
"experimentalDecorators": true,
|
||||
"module": "commonjs",
|
||||
|
|
|
@ -14,7 +14,7 @@ import {
|
|||
|
||||
import {IS_DART, stringify} from '../src/facade/lang';
|
||||
import {CompileMetadataResolver} from '../src/metadata_resolver';
|
||||
import {LifecycleHooks, LIFECYCLE_HOOKS_VALUES} from '@angular/core/src/metadata/lifecycle_hooks';
|
||||
import {LIFECYCLE_HOOKS_VALUES} from '@angular/core/src/metadata/lifecycle_hooks';
|
||||
import {
|
||||
Component,
|
||||
Directive,
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
"compilerOptions": {
|
||||
"baseUrl": ".",
|
||||
"declaration": true,
|
||||
"stripInternal": true,
|
||||
"emitDecoratorMetadata": true,
|
||||
"experimentalDecorators": true,
|
||||
"module": "es2015",
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
"compilerOptions": {
|
||||
"baseUrl": ".",
|
||||
"declaration": true,
|
||||
"stripInternal": true,
|
||||
"emitDecoratorMetadata": true,
|
||||
"experimentalDecorators": true,
|
||||
"module": "commonjs",
|
||||
|
|
|
@ -11,9 +11,6 @@ export enum LifecycleHooks {
|
|||
AfterViewChecked
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export var LIFECYCLE_HOOKS_VALUES = [
|
||||
LifecycleHooks.OnInit,
|
||||
LifecycleHooks.OnDestroy,
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
"compilerOptions": {
|
||||
"baseUrl": ".",
|
||||
"declaration": true,
|
||||
"stripInternal": true,
|
||||
"emitDecoratorMetadata": true,
|
||||
"experimentalDecorators": true,
|
||||
"module": "es2015",
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
"compilerOptions": {
|
||||
"baseUrl": ".",
|
||||
"declaration": true,
|
||||
"stripInternal": true,
|
||||
"emitDecoratorMetadata": true,
|
||||
"experimentalDecorators": true,
|
||||
"module": "commonjs",
|
||||
|
|
|
@ -98,8 +98,11 @@ export class ObservableWrapper {
|
|||
* Once a reference implementation of the spec is available, switch to it.
|
||||
*/
|
||||
export class EventEmitter<T> extends Subject<T> {
|
||||
/** @internal */
|
||||
_isAsync: boolean;
|
||||
// TODO: mark this as internal once all the facades are gone
|
||||
// we can't mark it as internal now because EventEmitter exported via @angular/core would not
|
||||
// contain this property making it incompatible with all the code that uses EventEmitter via
|
||||
// facades, which are local to the code and do not have this property stripped.
|
||||
__isAsync: boolean;
|
||||
|
||||
/**
|
||||
* Creates an instance of [EventEmitter], which depending on [isAsync],
|
||||
|
@ -107,7 +110,7 @@ export class EventEmitter<T> extends Subject<T> {
|
|||
*/
|
||||
constructor(isAsync: boolean = true) {
|
||||
super();
|
||||
this._isAsync = isAsync;
|
||||
this.__isAsync = isAsync;
|
||||
}
|
||||
|
||||
emit(value: T) { super.next(value); }
|
||||
|
@ -123,30 +126,30 @@ export class EventEmitter<T> extends Subject<T> {
|
|||
let completeFn = () => null;
|
||||
|
||||
if (generatorOrNext && typeof generatorOrNext === 'object') {
|
||||
schedulerFn = this._isAsync ? (value) => { setTimeout(() => generatorOrNext.next(value)); } :
|
||||
schedulerFn = this.__isAsync ? (value) => { setTimeout(() => generatorOrNext.next(value)); } :
|
||||
(value) => { generatorOrNext.next(value); };
|
||||
|
||||
if (generatorOrNext.error) {
|
||||
errorFn = this._isAsync ? (err) => { setTimeout(() => generatorOrNext.error(err)); } :
|
||||
errorFn = this.__isAsync ? (err) => { setTimeout(() => generatorOrNext.error(err)); } :
|
||||
(err) => { generatorOrNext.error(err); };
|
||||
}
|
||||
|
||||
if (generatorOrNext.complete) {
|
||||
completeFn = this._isAsync ? () => { setTimeout(() => generatorOrNext.complete()); } :
|
||||
completeFn = this.__isAsync ? () => { setTimeout(() => generatorOrNext.complete()); } :
|
||||
() => { generatorOrNext.complete(); };
|
||||
}
|
||||
} else {
|
||||
schedulerFn = this._isAsync ? (value) => { setTimeout(() => generatorOrNext(value)); } :
|
||||
schedulerFn = this.__isAsync ? (value) => { setTimeout(() => generatorOrNext(value)); } :
|
||||
(value) => { generatorOrNext(value); };
|
||||
|
||||
if (error) {
|
||||
errorFn =
|
||||
this._isAsync ? (err) => { setTimeout(() => error(err)); } : (err) => { error(err); };
|
||||
this.__isAsync ? (err) => { setTimeout(() => error(err)); } : (err) => { error(err); };
|
||||
}
|
||||
|
||||
if (complete) {
|
||||
completeFn =
|
||||
this._isAsync ? () => { setTimeout(() => complete()); } : () => { complete(); };
|
||||
this.__isAsync ? () => { setTimeout(() => complete()); } : () => { complete(); };
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
"compilerOptions": {
|
||||
"baseUrl": ".",
|
||||
"declaration": true,
|
||||
"stripInternal": true,
|
||||
"emitDecoratorMetadata": true,
|
||||
"experimentalDecorators": true,
|
||||
"module": "es2015",
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
"compilerOptions": {
|
||||
"baseUrl": ".",
|
||||
"declaration": true,
|
||||
"stripInternal": true,
|
||||
"emitDecoratorMetadata": true,
|
||||
"experimentalDecorators": true,
|
||||
"module": "commonjs",
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
"compilerOptions": {
|
||||
"baseUrl": ".",
|
||||
"declaration": true,
|
||||
"stripInternal": true,
|
||||
"emitDecoratorMetadata": true,
|
||||
"experimentalDecorators": true,
|
||||
"module": "es2015",
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
"compilerOptions": {
|
||||
"baseUrl": ".",
|
||||
"declaration": true,
|
||||
"stripInternal": true,
|
||||
"emitDecoratorMetadata": true,
|
||||
"experimentalDecorators": true,
|
||||
"module": "commonjs",
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
"compilerOptions": {
|
||||
"baseUrl": ".",
|
||||
"declaration": true,
|
||||
"stripInternal": true,
|
||||
"emitDecoratorMetadata": true,
|
||||
"experimentalDecorators": true,
|
||||
"module": "es2015",
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
"compilerOptions": {
|
||||
"baseUrl": ".",
|
||||
"declaration": true,
|
||||
"stripInternal": true,
|
||||
"emitDecoratorMetadata": true,
|
||||
"experimentalDecorators": true,
|
||||
"module": "commonjs",
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
"compilerOptions": {
|
||||
"baseUrl": ".",
|
||||
"declaration": true,
|
||||
"stripInternal": true,
|
||||
"emitDecoratorMetadata": true,
|
||||
"experimentalDecorators": true,
|
||||
"module": "es2015",
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
"compilerOptions": {
|
||||
"baseUrl": ".",
|
||||
"declaration": true,
|
||||
"stripInternal": true,
|
||||
"emitDecoratorMetadata": true,
|
||||
"experimentalDecorators": true,
|
||||
"module": "commonjs",
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
"compilerOptions": {
|
||||
"baseUrl": ".",
|
||||
"declaration": true,
|
||||
"stripInternal": true,
|
||||
"emitDecoratorMetadata": true,
|
||||
"experimentalDecorators": true,
|
||||
"module": "es2015",
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
"compilerOptions": {
|
||||
"baseUrl": ".",
|
||||
"declaration": true,
|
||||
"stripInternal": true,
|
||||
"emitDecoratorMetadata": true,
|
||||
"experimentalDecorators": true,
|
||||
"module": "commonjs",
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
"compilerOptions": {
|
||||
"baseUrl": ".",
|
||||
"declaration": true,
|
||||
"stripInternal": true,
|
||||
"emitDecoratorMetadata": true,
|
||||
"experimentalDecorators": true,
|
||||
"module": "es2015",
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
"compilerOptions": {
|
||||
"baseUrl": ".",
|
||||
"declaration": true,
|
||||
"stripInternal": true,
|
||||
"emitDecoratorMetadata": true,
|
||||
"experimentalDecorators": true,
|
||||
"module": "commonjs",
|
||||
|
|
Loading…
Reference in New Issue