Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,16 @@ impl<'a> Visit<'a> for ExplicitTypesChecker<'a, '_> {
// ignore
}

fn visit_new_expression(&mut self, it: &NewExpression<'a>) {
// Constructor arguments are implementation details of the exported value,
// not part of the module boundary. Still inspect the callee so class
// expressions used with `new` continue to be checked.
self.visit_expression(&it.callee);
if let Some(type_arguments) = &it.type_arguments {
self.visit_ts_type_parameter_instantiation(type_arguments);
}
}

fn visit_jsx_element(&mut self, _it: &JSXElement<'a>) {
// ignore
}
Expand Down Expand Up @@ -1538,6 +1548,14 @@ mod test {
"function Test(): void { const _x = () => { }; } function Test2() { return (): void => { }; } export { Test2 };",
None,
),
(
"
export const widgetSettingsDeserializer = new JsonInterfaceDeserializer<WidgetSettings, SupportedWidget>(
raw => raw.widgetSpecificationId as SupportedWidget
);
",
None,
),
];

let fail = vec![
Expand Down
Loading