Skip to content

Commit 1d0de3e

Browse files
PatrickJSrkirov
authored andcommitted
style(lang): add missing type annotation js/dart
1 parent a8bc7aa commit 1d0de3e

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

modules/facade/src/lang.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class StringWrapper {
5353
return parts;
5454
}
5555

56-
static equals(String s, String s2) {
56+
static bool equals(String s, String s2) {
5757
return s == s2;
5858
}
5959

@@ -150,7 +150,7 @@ bool isJsObject(o) {
150150
}
151151

152152

153-
assertionsEnabled() {
153+
bool assertionsEnabled() {
154154
try {
155155
assert(false);
156156
return false;

modules/facade/src/lang.es6

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export function stringify(token):string {
4444
}
4545

4646
export class StringWrapper {
47-
static fromCharCode(code:int) {
47+
static fromCharCode(code:int):string {
4848
return String.fromCharCode(code);
4949
}
5050

@@ -56,11 +56,11 @@ export class StringWrapper {
5656
return s.split(regExp.multiple);
5757
}
5858

59-
static equals(s:string, s2:string) {
59+
static equals(s:string, s2:string):boolean {
6060
return s === s2;
6161
}
6262

63-
static replaceAll(s:string, from:RegExp, replace:string) {
63+
static replaceAll(s:string, from:RegExp, replace:string):string {
6464
return s.replace(from.multiple, replace);
6565
}
6666
}
@@ -122,14 +122,14 @@ export class NumberWrapper {
122122
return parseFloat(text);
123123
}
124124

125-
static isNaN(value) {
126-
return isNaN(value);
127-
}
128-
129125
static get NaN():number {
130126
return NaN;
131127
}
132128

129+
static isNaN(value):boolean {
130+
return isNaN(value);
131+
}
132+
133133
static isInteger(value):boolean {
134134
return Number.isInteger(value);
135135
}
@@ -200,7 +200,7 @@ export function isJsObject(o):boolean {
200200
return o !== null && (typeof o === "function" || typeof o === "object");
201201
}
202202

203-
export function assertionsEnabled() {
203+
export function assertionsEnabled():boolean {
204204
try {
205205
var x:int = "string";
206206
return false;

0 commit comments

Comments
 (0)