File tree Expand file tree Collapse file tree 2 files changed +6
-19
lines changed Expand file tree Collapse file tree 2 files changed +6
-19
lines changed Original file line number Diff line number Diff line change @@ -712,17 +712,14 @@ export class EmitterLua {
712712 }
713713
714714 if ( parameters ) {
715- let dotDotDotAny = false ;
716715 parameters . forEach ( p => {
717716 const paramName = ( < ts . Identifier > p . name ) . text ;
718717 if ( addThisAsParameter && paramName === 'this' ) {
718+ addThisAsParameter = false ;
719719 return ;
720720 }
721721
722722 this . functionContext . createParam ( paramName ) ;
723- if ( p . dotDotDotToken ) {
724- dotDotDotAny = true ;
725- }
726723 } ) ;
727724 }
728725
Original file line number Diff line number Diff line change 1- function padLeft ( value : string , padding : number )
2- function padLeft ( value : string , padding : string )
3- function padLeft ( value : string , padding : any ) {
4- if ( typeof padding === "number" ) {
5- return String ( padding ) + value ;
6- }
7-
8- if ( typeof padding === "string" ) {
9- return padding + value ;
10- }
11-
12- throw new Error ( `Expected string or number, got \'${ padding } \'.` ) ;
13- }
14-
15- console . log ( padLeft ( "Hello world" , 4 ) ) ;
1+ class StringHelper {
2+ public static getLength ( this : string ) : number {
3+ return string . len ( this ) ;
4+ }
5+ }
You can’t perform that action at this time.
0 commit comments