refactor(compiler): element.startSourceSpan is required (#38581)
Previously, the `startSourceSpan` property could be null but in reality it is always well defined - except for a legacy case in the old i18n extraction/merging code, where the typings for source-spans are already being undermined. Making this property non-null, simplifies code elsewhere in the project. PR Close #38581
This commit is contained in:

committed by
Andrew Scott

parent
86e11f1110
commit
a68f1a78a7
@ -65,7 +65,7 @@ function getBoundedWordSpan(
|
||||
// The HTML tag may include `-` (e.g. `app-root`),
|
||||
// so use the HtmlAst to get the span before ayazhafiz refactor the code.
|
||||
return {
|
||||
start: templateInfo.template.span.start + ast.startSourceSpan!.start.offset + 1,
|
||||
start: templateInfo.template.span.start + ast.startSourceSpan.start.offset + 1,
|
||||
length: ast.name.length
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user