style(lang): add missing type annotation js/dart

This commit is contained in:
gdi2290 2015-01-09 20:51:27 -08:00 committed by Rado Kirov
parent a8bc7aa48f
commit 1d0de3ea54
2 changed files with 10 additions and 10 deletions

View File

@ -53,7 +53,7 @@ class StringWrapper {
return parts; return parts;
} }
static equals(String s, String s2) { static bool equals(String s, String s2) {
return s == s2; return s == s2;
} }
@ -150,7 +150,7 @@ bool isJsObject(o) {
} }
assertionsEnabled() { bool assertionsEnabled() {
try { try {
assert(false); assert(false);
return false; return false;

View File

@ -44,7 +44,7 @@ export function stringify(token):string {
} }
export class StringWrapper { export class StringWrapper {
static fromCharCode(code:int) { static fromCharCode(code:int):string {
return String.fromCharCode(code); return String.fromCharCode(code);
} }
@ -56,11 +56,11 @@ export class StringWrapper {
return s.split(regExp.multiple); return s.split(regExp.multiple);
} }
static equals(s:string, s2:string) { static equals(s:string, s2:string):boolean {
return s === s2; return s === s2;
} }
static replaceAll(s:string, from:RegExp, replace:string) { static replaceAll(s:string, from:RegExp, replace:string):string {
return s.replace(from.multiple, replace); return s.replace(from.multiple, replace);
} }
} }
@ -122,14 +122,14 @@ export class NumberWrapper {
return parseFloat(text); return parseFloat(text);
} }
static isNaN(value) {
return isNaN(value);
}
static get NaN():number { static get NaN():number {
return NaN; return NaN;
} }
static isNaN(value):boolean {
return isNaN(value);
}
static isInteger(value):boolean { static isInteger(value):boolean {
return Number.isInteger(value); return Number.isInteger(value);
} }
@ -200,7 +200,7 @@ export function isJsObject(o):boolean {
return o !== null && (typeof o === "function" || typeof o === "object"); return o !== null && (typeof o === "function" || typeof o === "object");
} }
export function assertionsEnabled() { export function assertionsEnabled():boolean {
try { try {
var x:int = "string"; var x:int = "string";
return false; return false;