mirror of
https://github.com/microsoft/pyright.git
synced 2024-09-19 20:27:45 +03:00
Changed redundant type name so type evaluator can be compiled with --emitDeclarationOnly option.
This commit is contained in:
parent
7c407527d6
commit
5ea3ae41e4
@ -116,8 +116,8 @@ export function synthesizeDataClassMethods(
|
||||
}
|
||||
|
||||
// Maintain a list of "type evaluators".
|
||||
type TypeEvaluator = () => Type;
|
||||
const localEntryTypeEvaluator: { entry: DataClassEntry; evaluator: TypeEvaluator }[] = [];
|
||||
type EntryTypeEvaluator = () => Type;
|
||||
const localEntryTypeEvaluator: { entry: DataClassEntry; evaluator: EntryTypeEvaluator }[] = [];
|
||||
let sawKeywordOnlySeparator = false;
|
||||
|
||||
node.suite.statements.forEach((statementList) => {
|
||||
@ -125,7 +125,7 @@ export function synthesizeDataClassMethods(
|
||||
statementList.statements.forEach((statement) => {
|
||||
let variableNameNode: NameNode | undefined;
|
||||
let aliasName: string | undefined;
|
||||
let variableTypeEvaluator: TypeEvaluator | undefined;
|
||||
let variableTypeEvaluator: EntryTypeEvaluator | undefined;
|
||||
let hasDefaultValue = false;
|
||||
let isKeywordOnly = ClassType.isDataClassKeywordOnlyParams(classType) || sawKeywordOnlySeparator;
|
||||
let defaultValueExpression: ExpressionNode | undefined;
|
||||
|
Loading…
Reference in New Issue
Block a user