[F] getSourceLocation
Call Signature
Section titled “Call Signature”function getSourceLocation(target, options?): SourceLocation;Resolve a diagnostic target’s source range, using a synthetic location when no bound source exists.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
target | DiagnosticTarget |
options? | SourceLocationOptions |
Returns
Section titled “Returns”Call Signature
Section titled “Call Signature”function getSourceLocation(target, options?): undefined;Return no location for an absent target or the explicit NoTarget sentinel.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
target | typeof NoTarget | undefined |
options? | SourceLocationOptions |
Returns
Section titled “Returns”undefined
Call Signature
Section titled “Call Signature”function getSourceLocation(target, options?): SourceLocation | undefined;Resolve an optional diagnostic target, returning undefined only when there is no target.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
target | | DiagnosticTarget | typeof NoTarget | undefined |
options? | SourceLocationOptions |
Returns
Section titled “Returns”SourceLocation | undefined