Added support for class-based definition of "NewType", which will appear in a new version of typeshed stubs soon.

This commit is contained in:
Eric Traut 2021-12-02 10:15:55 -08:00
parent acfc919d36
commit 6d7f0798cb

View File

@ -7364,6 +7364,10 @@ export function createTypeEvaluator(importLookup: ImportLookup, evaluatorOptions
return createNamedTupleType(evaluatorInterface, errorNode, argList, true);
}
if (className === 'NewType') {
return createNewType(errorNode, argList);
}
if (
className === 'Protocol' ||
className === 'Generic' ||