@@ -98,9 +98,9 @@ export function stringify(token): string {
9898export class StringWrapper {
9999 static fromCharCode ( code : int ) : string { return String . fromCharCode ( code ) ; }
100100
101- static charCodeAt ( s : string , index : int ) { return s . charCodeAt ( index ) ; }
101+ static charCodeAt ( s : string , index : int ) : number { return s . charCodeAt ( index ) ; }
102102
103- static split ( s : string , regExp ) { return s . split ( regExp ) ; }
103+ static split ( s : string , regExp ) : List < string > { return s . split ( regExp ) ; }
104104
105105 static equals ( s : string , s2 : string ) : boolean { return s === s2 ; }
106106
@@ -116,9 +116,9 @@ export class StringWrapper {
116116
117117 static toLowerCase ( s : string ) : string { return s . toLowerCase ( ) ; }
118118
119- static startsWith ( s : string , start : string ) { return s . startsWith ( start ) ; }
119+ static startsWith ( s : string , start : string ) : boolean { return s . startsWith ( start ) ; }
120120
121- static substring ( s : string , start : int , end : int = null ) {
121+ static substring ( s : string , start : int , end : int = null ) : string {
122122 return s . substring ( start , end === null ? undefined : end ) ;
123123 }
124124
@@ -139,7 +139,7 @@ export class StringWrapper {
139139export class StringJoiner {
140140 constructor ( public parts = [ ] ) { }
141141
142- add ( part : string ) { this . parts . push ( part ) ; }
142+ add ( part : string ) : void { this . parts . push ( part ) ; }
143143
144144 toString ( ) : string { return this . parts . join ( "" ) ; }
145145}
0 commit comments