Also correct the transpile to ES6 Also support generics correctly All patches are hooked in via `/tools/transpiler/index.js` https://github.com/google/traceur-compiler/issues/1700 https://github.com/google/traceur-compiler/issues/1699 https://github.com/google/traceur-compiler/issues/1708 https://github.com/google/traceur-compiler/issues/1625 https://github.com/google/traceur-compiler/issues/1706
32 lines
854 B
JavaScript
32 lines
854 B
JavaScript
import {ProtoRecord} from './proto_change_detector';
|
|
|
|
export class ExpressionChangedAfterItHasBeenChecked extends Error {
|
|
message:string;
|
|
|
|
constructor(proto:ProtoRecord, change:any) {
|
|
super();
|
|
this.message = `Expression '${proto.expressionAsString}' has changed after it was checked. ` +
|
|
`Previous value: '${change.previousValue}'. Current value: '${change.currentValue}'`;
|
|
}
|
|
|
|
toString():string {
|
|
return this.message;
|
|
}
|
|
}
|
|
|
|
export class ChangeDetectionError extends Error {
|
|
message:string;
|
|
originalException:any;
|
|
location:string;
|
|
|
|
constructor(proto:ProtoRecord, originalException:any) {
|
|
super();
|
|
this.originalException = originalException;
|
|
this.location = proto.expressionAsString;
|
|
this.message = `${this.originalException} in [${this.location}]`;
|
|
}
|
|
|
|
toString():string {
|
|
return this.message;
|
|
}
|
|
} |