refactor(compiler-cli): remove redundant `potentialSourceMapUrl` property (#42000)
Now that there is no need to work around the source-map bug in TypeScript (https://github.com/Microsoft/TypeScript/issues/29300) we can just use `resolvedTemplateUrl` for the source-map URL, rather than having a separate property. PR Close #42000
This commit is contained in:
parent
6912b1b364
commit
089daea98b
|
@ -1082,7 +1082,7 @@ export class ComponentDecoratorHandler implements
|
|||
type: 'direct',
|
||||
node: template.expression,
|
||||
};
|
||||
sourceMapUrl = template.potentialSourceMapUrl;
|
||||
sourceMapUrl = template.resolvedTemplateUrl;
|
||||
} else {
|
||||
const resolvedTemplate = this.evaluator.evaluate(template.expression);
|
||||
if (typeof resolvedTemplate !== 'string') {
|
||||
|
@ -1123,7 +1123,7 @@ export class ComponentDecoratorHandler implements
|
|||
...this._parseTemplate(
|
||||
template, /* sourceStr */ templateContent, /* sourceParseRange */ null,
|
||||
/* escapedString */ false,
|
||||
/* sourceMapUrl */ template.potentialSourceMapUrl),
|
||||
/* sourceMapUrl */ template.resolvedTemplateUrl),
|
||||
content: templateContent,
|
||||
sourceMapping: {
|
||||
type: 'external',
|
||||
|
@ -1230,7 +1230,6 @@ export class ComponentDecoratorHandler implements
|
|||
templateUrl,
|
||||
templateUrlExpression: templateUrlExpr,
|
||||
resolvedTemplateUrl: resourceUrl,
|
||||
potentialSourceMapUrl: resourceUrl,
|
||||
};
|
||||
} catch (e) {
|
||||
throw this.makeResourceNotFoundError(
|
||||
|
@ -1244,7 +1243,6 @@ export class ComponentDecoratorHandler implements
|
|||
expression: component.get('template')!,
|
||||
templateUrl: containingFile,
|
||||
resolvedTemplateUrl: containingFile,
|
||||
potentialSourceMapUrl: containingFile,
|
||||
};
|
||||
} else {
|
||||
throw new FatalDiagnosticError(
|
||||
|
@ -1394,7 +1392,6 @@ interface CommonTemplateDeclaration {
|
|||
interpolationConfig: InterpolationConfig;
|
||||
templateUrl: string;
|
||||
resolvedTemplateUrl: string;
|
||||
potentialSourceMapUrl: string;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue