File tree Expand file tree Collapse file tree 5 files changed +7
-7
lines changed
Expand file tree Collapse file tree 5 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -208,7 +208,7 @@ export class LuaTransformer {
208208 }
209209
210210 /** Converts an array of ts.Statements into an array of tstl.Statements */
211- private transformStatements ( statements : ts . Statement [ ] | ReadonlyArray < ts . Statement > ) : tstl . Statement [ ] {
211+ private transformStatements ( statements : readonly ts . Statement [ ] ) : tstl . Statement [ ] {
212212 const tstlStatements : tstl . Statement [ ] = [ ] ;
213213 ( statements as ts . Statement [ ] ) . forEach ( statement => {
214214 tstlStatements . push ( ...this . statementVisitResultToArray ( this . transformStatement ( statement ) ) ) ;
Original file line number Diff line number Diff line change @@ -470,15 +470,15 @@ export class TSHelper {
470470 return checker . getContextualType ( expression ) || checker . getTypeAtLocation ( expression ) ;
471471 }
472472
473- public static getAllCallSignatures ( type : ts . Type ) : ReadonlyArray < ts . Signature > {
473+ public static getAllCallSignatures ( type : ts . Type ) : readonly ts . Signature [ ] {
474474 if ( type . isUnion ( ) ) {
475475 return type . types . map ( t => TSHelper . getAllCallSignatures ( t ) ) . reduce ( ( a , b ) => a . concat ( b ) ) ;
476476 }
477477 return type . getCallSignatures ( ) ;
478478 }
479479
480480 public static getSignatureDeclarations (
481- signatures : ReadonlyArray < ts . Signature > ,
481+ signatures : readonly ts . Signature [ ] ,
482482 checker : ts . TypeChecker
483483 ) : ts . SignatureDeclaration [ ]
484484 {
Original file line number Diff line number Diff line change 11function __TS__ArrayFlatMap < T , U > (
22 this : void ,
33 array : T [ ] ,
4- callback : ( value : T , index : number , array : T [ ] ) => U | ReadonlyArray < U >
4+ callback : ( value : T , index : number , array : T [ ] ) => U | readonly U [ ]
55) : U [ ] {
66 let result : U [ ] = [ ] ;
77 for ( let i = 0 ; i < array . length ; i ++ ) {
Original file line number Diff line number Diff line change @@ -134,9 +134,9 @@ function performBuild(_args: string[]): void {
134134
135135function performCompilation (
136136 rootNames : string [ ] ,
137- projectReferences : ReadonlyArray < ts . ProjectReference > | undefined ,
137+ projectReferences : readonly ts . ProjectReference [ ] | undefined ,
138138 options : tstl . CompilerOptions ,
139- configFileParsingDiagnostics ?: ReadonlyArray < ts . Diagnostic >
139+ configFileParsingDiagnostics ?: readonly ts . Diagnostic [ ]
140140) : void {
141141 const program = ts . createProgram ( {
142142 rootNames,
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ test("Array access", () => {
1010
1111test ( "Readonly Array access" , ( ) => {
1212 const result = util . transpileAndExecute (
13- `const arr: ReadonlyArray< number> = [3,5,1];
13+ `const arr: readonly number[] = [3,5,1];
1414 return arr[1];` ,
1515 ) ;
1616 expect ( result ) . toBe ( 5 ) ;
You can’t perform that action at this time.
0 commit comments