Fixed bug that results in a false positive reportUntypedFunctionDecorator error under certain circumstances. This addresses #8298.

This commit is contained in:
Eric Traut 2024-07-02 16:40:34 -07:00
parent 8a766d59a4
commit 0591abaae8

View File

@ -2596,6 +2596,10 @@ export function containsAnyOrUnknown(type: Type, recurse: boolean): AnyType | Un
super();
}
override visitTypeAlias(type: Type) {
// Don't explore type aliases.
}
override visitUnknown(type: UnknownType) {
this.anyOrUnknownType = this.anyOrUnknownType ? preserveUnknown(this.anyOrUnknownType, type) : type;
}