@@ -5849,7 +5849,7 @@ export interface EmitResolver {
5849
5849
requiresAddingImplicitUndefined ( node : ParameterDeclaration , enclosingDeclaration : Node | undefined ) : boolean ;
5850
5850
isExpandoFunctionDeclaration ( node : FunctionDeclaration | VariableDeclaration ) : boolean ;
5851
5851
getPropertiesOfContainerFunction ( node : Declaration ) : Symbol [ ] ;
5852
- createTypeOfDeclaration ( declaration : AccessorDeclaration | VariableLikeDeclaration | PropertyAccessExpression | ElementAccessExpression | BinaryExpression , enclosingDeclaration : Node , flags : NodeBuilderFlags , internalFlags : InternalNodeBuilderFlags , tracker : SymbolTracker ) : TypeNode | undefined ;
5852
+ createTypeOfDeclaration ( declaration : HasInferredType , enclosingDeclaration : Node , flags : NodeBuilderFlags , internalFlags : InternalNodeBuilderFlags , tracker : SymbolTracker ) : TypeNode | undefined ;
5853
5853
createReturnTypeOfSignatureDeclaration ( signatureDeclaration : SignatureDeclaration , enclosingDeclaration : Node , flags : NodeBuilderFlags , internalFlags : InternalNodeBuilderFlags , tracker : SymbolTracker ) : TypeNode | undefined ;
5854
5854
createTypeOfExpression ( expr : Expression , enclosingDeclaration : Node , flags : NodeBuilderFlags , internalFlags : InternalNodeBuilderFlags , tracker : SymbolTracker ) : TypeNode | undefined ;
5855
5855
createLiteralConstValue ( node : VariableDeclaration | PropertyDeclaration | PropertySignature | ParameterDeclaration , tracker : SymbolTracker ) : Expression ;
@@ -10504,37 +10504,66 @@ export interface EvaluationResolver {
10504
10504
10505
10505
/** @internal */
10506
10506
export type HasInferredType =
10507
- | PropertyAssignment
10507
+ | Exclude < VariableLikeDeclaration , JsxAttribute | EnumMember >
10508
10508
| PropertyAccessExpression
10509
- | BinaryExpression
10510
10509
| ElementAccessExpression
10511
- | VariableDeclaration
10512
- | ParameterDeclaration
10513
- | BindingElement
10514
- | PropertyDeclaration
10515
- | PropertySignature
10510
+ | BinaryExpression
10516
10511
| ExportAssignment ;
10517
10512
10518
10513
/** @internal */
10519
10514
export interface SyntacticTypeNodeBuilderContext {
10515
+ flags : NodeBuilderFlags ;
10520
10516
tracker : Required < Pick < SymbolTracker , "reportInferenceFallback" > > ;
10517
+ enclosingFile : SourceFile | undefined ;
10521
10518
enclosingDeclaration : Node | undefined ;
10519
+ approximateLength : number ;
10520
+ noInferenceFallback ?: boolean ;
10521
+ suppressReportInferenceFallback : boolean ;
10522
10522
}
10523
10523
10524
10524
/** @internal */
10525
10525
export interface SyntacticTypeNodeBuilderResolver {
10526
+ isOptionalParameter ( p : ParameterDeclaration ) : boolean ;
10526
10527
isUndefinedIdentifierExpression ( name : Identifier ) : boolean ;
10527
10528
isExpandoFunctionDeclaration ( name : FunctionDeclaration | VariableDeclaration ) : boolean ;
10528
10529
getAllAccessorDeclarations ( declaration : AccessorDeclaration ) : AllAccessorDeclarations ;
10529
- isEntityNameVisible ( entityName : EntityNameOrEntityNameExpression , enclosingDeclaration : Node , shouldComputeAliasToMakeVisible ?: boolean ) : SymbolVisibilityResult ;
10530
- requiresAddingImplicitUndefined ( parameter : ParameterDeclaration | JSDocParameterTag , enclosingDeclaration : Node | undefined ) : boolean ;
10530
+ requiresAddingImplicitUndefined ( declaration : ParameterDeclaration | PropertySignature | JSDocParameterTag | JSDocPropertyTag | PropertyDeclaration , symbol : Symbol | undefined , enclosingDeclaration : Node | undefined ) : boolean ;
10531
10531
isDefinitelyReferenceToGlobalSymbolObject ( node : Node ) : boolean ;
10532
+ isEntityNameVisible ( context : SyntacticTypeNodeBuilderContext , entityName : EntityNameOrEntityNameExpression , shouldComputeAliasToMakeVisible ?: boolean ) : SymbolVisibilityResult ;
10533
+ serializeExistingTypeNode ( context : SyntacticTypeNodeBuilderContext , node : TypeNode , addUndefined ?: boolean ) : TypeNode | undefined ;
10534
+ serializeReturnTypeForSignature ( context : SyntacticTypeNodeBuilderContext , signatureDeclaration : SignatureDeclaration | JSDocSignature ) : TypeNode | undefined ;
10535
+ serializeTypeOfExpression ( context : SyntacticTypeNodeBuilderContext , expr : Expression ) : TypeNode ;
10536
+ serializeTypeOfDeclaration ( context : SyntacticTypeNodeBuilderContext , node : HasInferredType | GetAccessorDeclaration | SetAccessorDeclaration , symbol : Symbol | undefined ) : TypeNode | undefined ;
10537
+ serializeNameOfParameter ( context : SyntacticTypeNodeBuilderContext , parameter : ParameterDeclaration ) : BindingName | string ;
10538
+ serializeTypeName ( context : SyntacticTypeNodeBuilderContext , node : EntityName , isTypeOf ?: boolean , typeArguments ?: readonly TypeNode [ ] ) : TypeNode | undefined ;
10539
+ serializeEntityName ( context : SyntacticTypeNodeBuilderContext , node : EntityNameExpression ) : Expression | undefined ;
10540
+ getJsDocPropertyOverride ( context : SyntacticTypeNodeBuilderContext , jsDocTypeLiteral : JSDocTypeLiteral , jsDocProperty : JSDocPropertyLikeTag ) : TypeNode | undefined ;
10541
+ enterNewScope ( context : SyntacticTypeNodeBuilderContext , node : IntroducesNewScopeNode | ConditionalTypeNode ) : ( ) => void ;
10542
+ markNodeReuse < T extends Node > ( context : SyntacticTypeNodeBuilderContext , range : T , location : Node | undefined ) : T ;
10543
+ trackExistingEntityName < T extends EntityNameOrEntityNameExpression > ( context : SyntacticTypeNodeBuilderContext , node : T ) : { introducesError : boolean ; node : T ; } ;
10544
+ trackComputedName ( context : SyntacticTypeNodeBuilderContext , accessExpression : EntityNameOrEntityNameExpression ) : void ;
10545
+ evaluateEntityNameExpression ( expression : EntityNameExpression ) : EvaluatorResult ;
10546
+ getModuleSpecifierOverride ( context : SyntacticTypeNodeBuilderContext , parent : ImportTypeNode , lit : StringLiteral ) : string | undefined ;
10547
+ canReuseTypeNode ( context : SyntacticTypeNodeBuilderContext , existing : TypeNode ) : boolean ;
10548
+ canReuseTypeNodeAnnotation ( context : SyntacticTypeNodeBuilderContext , node : Declaration , existing : TypeNode , symbol : Symbol | undefined , requiresAddingUndefined ?: boolean ) : boolean ;
10549
+ shouldRemoveDeclaration ( context : SyntacticTypeNodeBuilderContext , node : DynamicNamedDeclaration ) : boolean ;
10550
+ hasLateBindableName ( node : Declaration ) : node is LateBoundDeclaration | LateBoundBinaryExpressionDeclaration ;
10551
+ createRecoveryBoundary ( context : SyntacticTypeNodeBuilderContext ) : {
10552
+ startRecoveryScope ( ) : ( ) => void ;
10553
+ finalizeBoundary ( ) : boolean ;
10554
+ markError ( ) : void ;
10555
+ hadError ( ) : boolean ;
10556
+ } ;
10532
10557
}
10533
10558
10534
10559
/** @internal */
10535
10560
export interface SyntacticNodeBuilder {
10536
- typeFromExpression : ( node : Expression , context : SyntacticTypeNodeBuilderContext , isConstContext ?: boolean , requiresAddingUndefined ?: boolean , preserveLiterals ?: boolean ) => boolean | undefined ;
10537
- serializeTypeOfDeclaration : ( node : HasInferredType , context : SyntacticTypeNodeBuilderContext ) => boolean | undefined ;
10538
- serializeReturnTypeForSignature : ( node : SignatureDeclaration | JSDocSignature , context : SyntacticTypeNodeBuilderContext ) => boolean | undefined ;
10539
- serializeTypeOfExpression : ( expr : Expression , context : SyntacticTypeNodeBuilderContext , addUndefined ?: boolean , preserveLiterals ?: boolean ) => boolean ;
10561
+ serializeTypeOfDeclaration : ( node : HasInferredType , symbol : Symbol , context : SyntacticTypeNodeBuilderContext ) => TypeNode | undefined ;
10562
+ serializeReturnTypeForSignature : ( signature : SignatureDeclaration | JSDocSignature , symbol : Symbol , context : SyntacticTypeNodeBuilderContext ) => TypeNode | undefined ;
10563
+ serializeTypeOfExpression : ( expr : Expression | JsxAttributeValue , context : SyntacticTypeNodeBuilderContext , addUndefined ?: boolean , preserveLiterals ?: boolean ) => TypeNode ;
10564
+ tryReuseExistingTypeNode : ( context : SyntacticTypeNodeBuilderContext , existing : TypeNode ) => TypeNode | undefined ;
10565
+ serializeTypeOfAccessor : ( accessor : AccessorDeclaration , symbol : Symbol , context : SyntacticTypeNodeBuilderContext ) => TypeNode | undefined ;
10540
10566
}
10567
+
10568
+ /** @internal */
10569
+ export type IntroducesNewScopeNode = SignatureDeclaration | JSDocSignature | MappedTypeNode ;
0 commit comments