mirror of
https://github.com/microsoft/pyright.git
synced 2024-10-07 05:17:10 +03:00
Added support for class-based definition of "NewType", which will appear in a new version of typeshed stubs soon.
This commit is contained in:
parent
acfc919d36
commit
6d7f0798cb
@ -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' ||
|
||||
|
Loading…
Reference in New Issue
Block a user