
committed by
Matias Niemelä

parent
9081efa961
commit
ea68ba048a
@ -192,7 +192,7 @@ export class IvyCompilation {
|
||||
* Process a .d.ts source string and return a transformed version that incorporates the changes
|
||||
* made to the source file.
|
||||
*/
|
||||
transformedDtsFor(tsFileName: string, dtsOriginalSource: string, dtsPath: string): string {
|
||||
transformedDtsFor(tsFileName: string, dtsOriginalSource: string): string {
|
||||
// No need to transform if no changes have been requested to the input file.
|
||||
if (!this.dtsMap.has(tsFileName)) {
|
||||
return dtsOriginalSource;
|
||||
|
@ -8,8 +8,6 @@
|
||||
|
||||
import * as ts from 'typescript';
|
||||
|
||||
import {relativePathBetween} from '../../util/src/path';
|
||||
|
||||
import {CompileResult} from './api';
|
||||
import {ImportManager, translateType} from './translator';
|
||||
|
||||
|
@ -310,7 +310,7 @@ export class TypeTranslatorVisitor implements ExpressionVisitor, TypeVisitor {
|
||||
const exprStr = type.value.visitExpression(this, context);
|
||||
if (type.typeParams !== null) {
|
||||
const typeSegments = type.typeParams.map(param => param.visitType(this, context));
|
||||
return `${exprStr}<${typeSegments.join(',')}>`;
|
||||
return `${exprStr}<${typeSegments.join(', ')}>`;
|
||||
} else {
|
||||
return exprStr;
|
||||
}
|
||||
@ -412,7 +412,7 @@ export class TypeTranslatorVisitor implements ExpressionVisitor, TypeVisitor {
|
||||
|
||||
visitLiteralArrayExpr(ast: LiteralArrayExpr, context: Context): string {
|
||||
const values = ast.entries.map(expr => expr.visitExpression(this, context));
|
||||
return `[${values.join(',')}]`;
|
||||
return `[${values.join(', ')}]`;
|
||||
}
|
||||
|
||||
visitLiteralMapExpr(ast: LiteralMapExpr, context: Context) {
|
||||
@ -434,4 +434,4 @@ export class TypeTranslatorVisitor implements ExpressionVisitor, TypeVisitor {
|
||||
visitTypeofExpr(ast: TypeofExpr, context: Context): string {
|
||||
return `typeof ${ast.expr.visitExpression(this, context)}`;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user