chore: Make enum names consistent with TypeScript convention

BREAKING_CHANGE

Ts2Dart issue: https://github.com/angular/ts2dart/issues/270
TypeScript convention: https://github.com/Microsoft/TypeScript/wiki/Coding-guidelines
DartConvertion: https://www.dartlang.org/articles/style-guide/

Rename:

- NumberFormatStyle.DECIMAL => NumberFormatStyle.Decimal
- NumberFormatStyle.PERCENT => NumberFormatStyle.Percent
- NumberFormatStyle.CURRENCY => NumberFormatStyle.Currency
- RequestMethods.GET => RequestMethods.Get
- RequestMethods.POST => RequestMethods.Post
- RequestMethods.PUT => RequestMethods.Put
- RequestMethods.DELETE => RequestMethods.Delete
- RequestMethods.HEAD => RequestMethods.Head
- RequestMethods.PATCH => RequestMethods.Patch
- ReadyStates.UNSENT => ReadyStates.Unsent
- ReadyStates.OPEN => ReadyStates.Open
- ReadyStates.HEADERS_RECEIVED => ReadyStates.HeadersReceived
- ReadyStates.LOADING => ReadyStates.Loading
- ReadyStates.DONE => ReadyStates.Done
- ReadyStates.CANCELLED => ReadyStates.Canceled
This commit is contained in:
Misko Hevery
2015-08-26 13:40:12 -07:00
parent 465f7c95b0
commit 37b042b361
23 changed files with 206 additions and 209 deletions

View File

@ -90,7 +90,7 @@ export class NumberPipe {
export class DecimalPipe extends NumberPipe implements PipeTransform {
transform(value: any, args: any[]): string {
var digits: string = ListWrapper.first(args);
return NumberPipe._format(value, NumberFormatStyle.DECIMAL, digits);
return NumberPipe._format(value, NumberFormatStyle.Decimal, digits);
}
}
@ -112,7 +112,7 @@ export class DecimalPipe extends NumberPipe implements PipeTransform {
export class PercentPipe extends NumberPipe implements PipeTransform {
transform(value: any, args: any[]): string {
var digits: string = ListWrapper.first(args);
return NumberPipe._format(value, NumberFormatStyle.PERCENT, digits);
return NumberPipe._format(value, NumberFormatStyle.Percent, digits);
}
}
@ -140,7 +140,7 @@ export class CurrencyPipe extends NumberPipe implements PipeTransform {
var currencyCode: string = isPresent(args) && args.length > 0 ? args[0] : 'USD';
var symbolDisplay: boolean = isPresent(args) && args.length > 1 ? args[1] : false;
var digits: string = isPresent(args) && args.length > 2 ? args[2] : null;
return NumberPipe._format(value, NumberFormatStyle.CURRENCY, digits, currencyCode,
return NumberPipe._format(value, NumberFormatStyle.Currency, digits, currencyCode,
symbolDisplay);
}
}