-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Add source mappings for serialized properties with available declaration #60005
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 5 commits
11ebae9
c5c2fe7
3a84cca
5a8bc8b
aeaede2
4b57ecb
c25efdc
ff71ac9
5dac6a6
c8ab65c
01983e0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -985,6 +985,7 @@ import { | |
| setNodeFlags, | ||
| setOriginalNode, | ||
| setParent, | ||
| setSourceMapRange, | ||
| setSyntheticLeadingComments, | ||
| setTextRange as setTextRangeWorker, | ||
| setTextRangePosEnd, | ||
|
|
@@ -7174,8 +7175,12 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { | |
| context.tracker.reportNonSerializableProperty(symbolToString(propertySymbol)); | ||
| } | ||
| } | ||
| context.enclosingDeclaration = propertySymbol.valueDeclaration || propertySymbol.declarations?.[0] || saveEnclosingDeclaration; | ||
| const propertyDeclaration = propertySymbol.valueDeclaration || propertySymbol.declarations?.[0]; | ||
| context.enclosingDeclaration = propertyDeclaration || saveEnclosingDeclaration; | ||
| const propertyName = getPropertyNameNodeForSymbol(propertySymbol, context); | ||
| if (propertyDeclaration && (isPropertyAssignment(propertyDeclaration) || isShorthandPropertyAssignment(propertyDeclaration) || isMethodDeclaration(propertyDeclaration) || isMethodSignature(propertyDeclaration) || isPropertySignature(propertyDeclaration) || isPropertyDeclaration(propertyDeclaration) || isGetOrSetAccessorDeclaration(propertyDeclaration))) { | ||
| setSourceMapRange(propertyName, propertyDeclaration.name); | ||
|
||
| } | ||
| context.enclosingDeclaration = saveEnclosingDeclaration; | ||
| context.approximateLength += symbolName(propertySymbol).length + 1; | ||
|
|
||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.