@@ -162,7 +162,7 @@ export class TemplateCompiler {
|
||||
});
|
||||
ListWrapper.forEachWithIndex(componentMetas, (compMeta: CompileDirectiveMetadata,
|
||||
index: number) => {
|
||||
var templateDataFn = codeGenValueFn([], `[${templateArguments[index].join(',')}]`);
|
||||
var templateDataFn = codeGenValueFn([], `[${(<any[]>templateArguments[index]).join(',')}]`);
|
||||
declarations.push(
|
||||
`${codeGenExportVariable(templateVariableName(compMeta.type))}new ${TEMPLATE_COMMANDS_MODULE_REF}CompiledTemplate(${compMeta.type.id},${templateDataFn});`);
|
||||
});
|
||||
|
||||
@@ -216,7 +216,7 @@ export class AbstractChangeDetector<T> implements ChangeDetector {
|
||||
}
|
||||
|
||||
// This is an experimental feature. Works only in Dart.
|
||||
protected observeValue(value: any, index: number): any {
|
||||
observeValue(value: any, index: number): any {
|
||||
if (isObservable(value)) {
|
||||
this._createArrayToStoreObservables();
|
||||
if (isBlank(this.subscriptions[index])) {
|
||||
@@ -232,7 +232,7 @@ export class AbstractChangeDetector<T> implements ChangeDetector {
|
||||
}
|
||||
|
||||
// This is an experimental feature. Works only in Dart.
|
||||
protected observeDirective(value: any, index: number): any {
|
||||
observeDirective(value: any, index: number): any {
|
||||
if (isObservable(value)) {
|
||||
this._createArrayToStoreObservables();
|
||||
var arrayIndex = this.numberOfPropertyProtoRecords + index + 2; // +1 is component
|
||||
@@ -243,7 +243,7 @@ export class AbstractChangeDetector<T> implements ChangeDetector {
|
||||
}
|
||||
|
||||
// This is an experimental feature. Works only in Dart.
|
||||
protected observeComponent(value: any): any {
|
||||
observeComponent(value: any): any {
|
||||
if (isObservable(value)) {
|
||||
this._createArrayToStoreObservables();
|
||||
var index = this.numberOfPropertyProtoRecords + 1;
|
||||
@@ -262,24 +262,23 @@ export class AbstractChangeDetector<T> implements ChangeDetector {
|
||||
}
|
||||
}
|
||||
|
||||
protected getDirectiveFor(directives: any, index: number): any {
|
||||
getDirectiveFor(directives: any, index: number): any {
|
||||
return directives.getDirectiveFor(this.directiveIndices[index]);
|
||||
}
|
||||
|
||||
protected getDetectorFor(directives: any, index: number): ChangeDetector {
|
||||
getDetectorFor(directives: any, index: number): ChangeDetector {
|
||||
return directives.getDetectorFor(this.directiveIndices[index]);
|
||||
}
|
||||
|
||||
protected notifyDispatcher(value: any): void {
|
||||
notifyDispatcher(value: any): void {
|
||||
this.dispatcher.notifyOnBinding(this._currentBinding(), value);
|
||||
}
|
||||
|
||||
protected logBindingUpdate(value: any): void {
|
||||
logBindingUpdate(value: any): void {
|
||||
this.dispatcher.logBindingUpdate(this._currentBinding(), value);
|
||||
}
|
||||
|
||||
protected addChange(changes: StringMap<string, any>, oldValue: any,
|
||||
newValue: any): StringMap<string, any> {
|
||||
addChange(changes: StringMap<string, any>, oldValue: any, newValue: any): StringMap<string, any> {
|
||||
if (isBlank(changes)) {
|
||||
changes = {};
|
||||
}
|
||||
@@ -295,12 +294,12 @@ export class AbstractChangeDetector<T> implements ChangeDetector {
|
||||
throw new ChangeDetectionError(this._currentBinding().debug, exception, stack, context);
|
||||
}
|
||||
|
||||
protected throwOnChangeError(oldValue: any, newValue: any): void {
|
||||
throwOnChangeError(oldValue: any, newValue: any): void {
|
||||
throw new ExpressionChangedAfterItHasBeenCheckedException(this._currentBinding().debug,
|
||||
oldValue, newValue, null);
|
||||
}
|
||||
|
||||
protected throwDehydratedError(): void { throw new DehydratedException(); }
|
||||
throwDehydratedError(): void { throw new DehydratedException(); }
|
||||
|
||||
private _currentBinding(): BindingTarget {
|
||||
return this.bindingTargets[this.propertyBindingIndex];
|
||||
|
||||
@@ -77,7 +77,7 @@ export class DirectiveResolver {
|
||||
}
|
||||
|
||||
if (a instanceof HostListenerMetadata) {
|
||||
var args = isPresent(a.args) ? a.args.join(', ') : '';
|
||||
var args = isPresent(a.args) ? (<any[]>a.args).join(', ') : '';
|
||||
host[`(${a.eventName})`] = `${propName}(${args})`;
|
||||
}
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ export class ExceptionHandler {
|
||||
}
|
||||
|
||||
_longStackTrace(stackTrace: any): any {
|
||||
return isListLikeIterable(stackTrace) ? (<any>stackTrace).join("\n\n-----async gap-----\n") :
|
||||
return isListLikeIterable(stackTrace) ? (<any[]>stackTrace).join("\n\n-----async gap-----\n") :
|
||||
stackTrace.toString();
|
||||
}
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@ export class StyleInliner {
|
||||
}
|
||||
|
||||
return PromiseWrapper.all(promises).then(function(cssParts) {
|
||||
var cssText = cssParts.join('');
|
||||
var cssText = (<any[]>cssParts).join('');
|
||||
if (partIndex < parts.length) {
|
||||
// append then content located after the last @import rule
|
||||
cssText += parts[partIndex];
|
||||
|
||||
@@ -5,8 +5,8 @@ import {DOCUMENT} from '../dom_tokens';
|
||||
|
||||
@Injectable()
|
||||
export class SharedStylesHost {
|
||||
protected _styles: string[] = [];
|
||||
protected _stylesSet: Set<string> = new Set();
|
||||
_styles: string[] = [];
|
||||
_stylesSet: Set<string> = new Set();
|
||||
|
||||
constructor() {}
|
||||
|
||||
@@ -22,7 +22,7 @@ export class SharedStylesHost {
|
||||
this.onStylesAdded(additions);
|
||||
}
|
||||
|
||||
protected onStylesAdded(additions: string[]) {}
|
||||
onStylesAdded(additions: string[]) {}
|
||||
|
||||
getAllStyles(): string[] { return this._styles; }
|
||||
}
|
||||
|
||||
@@ -20,10 +20,7 @@ function mergeOptions(defaultOpts, providedOpts, method, url): RequestOptions {
|
||||
url: providedOpts.url,
|
||||
search: providedOpts.search,
|
||||
headers: providedOpts.headers,
|
||||
body: providedOpts.body,
|
||||
mode: providedOpts.mode,
|
||||
credentials: providedOpts.credentials,
|
||||
cache: providedOpts.cache
|
||||
body: providedOpts.body
|
||||
}));
|
||||
}
|
||||
if (isPresent(method)) {
|
||||
|
||||
@@ -40,9 +40,6 @@ export type RequestOptionsArgs = {
|
||||
headers?: Headers;
|
||||
// TODO: Support Blob, ArrayBuffer, JSON, URLSearchParams, FormData
|
||||
body?: string;
|
||||
mode?: any;
|
||||
credentials?: any;
|
||||
cache?: any;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -19,7 +19,7 @@ export class ClientMessageBrokerFactory {
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
constructor(private _messageBus: MessageBus, protected _serializer: Serializer) {}
|
||||
constructor(private _messageBus: MessageBus, public _serializer: Serializer) {}
|
||||
|
||||
/**
|
||||
* Initializes the given channel and attaches a new {@link ClientMessageBroker} to it.
|
||||
@@ -37,7 +37,7 @@ export class ClientMessageBroker {
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
constructor(messageBus: MessageBus, protected _serializer: Serializer, public channel) {
|
||||
constructor(messageBus: MessageBus, public _serializer: Serializer, public channel) {
|
||||
this._sink = messageBus.to(channel);
|
||||
var source = messageBus.from(channel);
|
||||
ObservableWrapper.subscribe(source,
|
||||
|
||||
@@ -15,7 +15,7 @@ export class ServiceMessageBrokerFactory {
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
constructor(private _messageBus: MessageBus, protected _serializer: Serializer) {}
|
||||
constructor(private _messageBus: MessageBus, public _serializer: Serializer) {}
|
||||
|
||||
/**
|
||||
* Initializes the given channel and attaches a new {@link ServiceMessageBroker} to it.
|
||||
|
||||
Reference in New Issue
Block a user