Closed
Description
Bug Report
π Search Terms
ExpressionWithTypeArguments
, getTypeAtLocation
, checker
, api, error any.
π Version & Regression Information
- This is a bug in the
@next
version of TS.
β― Playground Link
Because this is a bug with the API specifically, here is a link to the ast explorer.
https://ts-ast-viewer.com/#code/GYVwdgxgLglg9mABAWwIYGsCmAhOAPAHgBUA+ACgDdUAbETALkSIEpEBvAKEUQCdMoQPJG0RVamRAF8A3B0kcOEBAGcoKDJgDKUHjDABzXHkQBedViMFVugyWlA
π» Code
function makeBox<T>(value: T) {
return { value };
}
const makeStringBox = makeBox<string>;
const sett = Set<string>;
π Actual behavior
checker.getTypeAtLocation
for the ExpressionWithTypeArguments
node returns an error any
.
π Expected behavior
checker.getTypeAtLocation
for the ExpressionWithTypeArguments
node returns the relevant type of the expression, which would be (value: string) => {value: string}