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',
|
type: 'direct',
|
||||||
node: template.expression,
|
node: template.expression,
|
||||||
};
|
};
|
||||||
sourceMapUrl = template.potentialSourceMapUrl;
|
sourceMapUrl = template.resolvedTemplateUrl;
|
||||||
} else {
|
} else {
|
||||||
const resolvedTemplate = this.evaluator.evaluate(template.expression);
|
const resolvedTemplate = this.evaluator.evaluate(template.expression);
|
||||||
if (typeof resolvedTemplate !== 'string') {
|
if (typeof resolvedTemplate !== 'string') {
|
||||||
|
@ -1123,7 +1123,7 @@ export class ComponentDecoratorHandler implements
|
||||||
...this._parseTemplate(
|
...this._parseTemplate(
|
||||||
template, /* sourceStr */ templateContent, /* sourceParseRange */ null,
|
template, /* sourceStr */ templateContent, /* sourceParseRange */ null,
|
||||||
/* escapedString */ false,
|
/* escapedString */ false,
|
||||||
/* sourceMapUrl */ template.potentialSourceMapUrl),
|
/* sourceMapUrl */ template.resolvedTemplateUrl),
|
||||||
content: templateContent,
|
content: templateContent,
|
||||||
sourceMapping: {
|
sourceMapping: {
|
||||||
type: 'external',
|
type: 'external',
|
||||||
|
@ -1230,7 +1230,6 @@ export class ComponentDecoratorHandler implements
|
||||||
templateUrl,
|
templateUrl,
|
||||||
templateUrlExpression: templateUrlExpr,
|
templateUrlExpression: templateUrlExpr,
|
||||||
resolvedTemplateUrl: resourceUrl,
|
resolvedTemplateUrl: resourceUrl,
|
||||||
potentialSourceMapUrl: resourceUrl,
|
|
||||||
};
|
};
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
throw this.makeResourceNotFoundError(
|
throw this.makeResourceNotFoundError(
|
||||||
|
@ -1244,7 +1243,6 @@ export class ComponentDecoratorHandler implements
|
||||||
expression: component.get('template')!,
|
expression: component.get('template')!,
|
||||||
templateUrl: containingFile,
|
templateUrl: containingFile,
|
||||||
resolvedTemplateUrl: containingFile,
|
resolvedTemplateUrl: containingFile,
|
||||||
potentialSourceMapUrl: containingFile,
|
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
throw new FatalDiagnosticError(
|
throw new FatalDiagnosticError(
|
||||||
|
@ -1394,7 +1392,6 @@ interface CommonTemplateDeclaration {
|
||||||
interpolationConfig: InterpolationConfig;
|
interpolationConfig: InterpolationConfig;
|
||||||
templateUrl: string;
|
templateUrl: string;
|
||||||
resolvedTemplateUrl: string;
|
resolvedTemplateUrl: string;
|
||||||
potentialSourceMapUrl: string;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue