@@ -5073,14 +5073,14 @@ export interface TypeChecker {
5073
5073
// TODO: GH#18217 `xToDeclaration` calls are frequently asserted as defined.
5074
5074
/** Note that the resulting nodes cannot be checked. */
5075
5075
typeToTypeNode ( type : Type , enclosingDeclaration : Node | undefined , flags : NodeBuilderFlags | undefined ) : TypeNode | undefined ;
5076
- /** @internal */ typeToTypeNode ( type : Type , enclosingDeclaration : Node | undefined , flags : NodeBuilderFlags | undefined , tracker ?: SymbolTracker ) : TypeNode | undefined ; // eslint-disable-line @typescript-eslint/unified-signatures
5077
- /** @internal */ typePredicateToTypePredicateNode ( typePredicate : TypePredicate , enclosingDeclaration : Node | undefined , flags : NodeBuilderFlags | undefined , tracker ?: SymbolTracker ) : TypePredicateNode | undefined ;
5076
+ /** @internal */ typeToTypeNode ( type : Type , enclosingDeclaration : Node | undefined , flags : NodeBuilderFlags | undefined , internalFlags ?: InternalNodeBuilderFlags | undefined , tracker ?: SymbolTracker ) : TypeNode | undefined ; // eslint-disable-line @typescript-eslint/unified-signatures
5077
+ /** @internal */ typePredicateToTypePredicateNode ( typePredicate : TypePredicate , enclosingDeclaration : Node | undefined , flags : NodeBuilderFlags | undefined , internalFlags ?: InternalNodeBuilderFlags | undefined , tracker ?: SymbolTracker ) : TypePredicateNode | undefined ;
5078
5078
/** Note that the resulting nodes cannot be checked. */
5079
5079
signatureToSignatureDeclaration ( signature : Signature , kind : SyntaxKind , enclosingDeclaration : Node | undefined , flags : NodeBuilderFlags | undefined ) : SignatureDeclaration & { typeArguments ?: NodeArray < TypeNode > ; } | undefined ;
5080
- /** @internal */ signatureToSignatureDeclaration ( signature : Signature , kind : SyntaxKind , enclosingDeclaration : Node | undefined , flags : NodeBuilderFlags | undefined , tracker ?: SymbolTracker ) : SignatureDeclaration & { typeArguments ?: NodeArray < TypeNode > ; } | undefined ; // eslint-disable-line @typescript-eslint/unified-signatures
5080
+ /** @internal */ signatureToSignatureDeclaration ( signature : Signature , kind : SyntaxKind , enclosingDeclaration : Node | undefined , flags : NodeBuilderFlags | undefined , internalFlags ?: InternalNodeBuilderFlags | undefined , tracker ?: SymbolTracker ) : SignatureDeclaration & { typeArguments ?: NodeArray < TypeNode > ; } | undefined ; // eslint-disable-line @typescript-eslint/unified-signatures
5081
5081
/** Note that the resulting nodes cannot be checked. */
5082
5082
indexInfoToIndexSignatureDeclaration ( indexInfo : IndexInfo , enclosingDeclaration : Node | undefined , flags : NodeBuilderFlags | undefined ) : IndexSignatureDeclaration | undefined ;
5083
- /** @internal */ indexInfoToIndexSignatureDeclaration ( indexInfo : IndexInfo , enclosingDeclaration : Node | undefined , flags : NodeBuilderFlags | undefined , tracker ?: SymbolTracker ) : IndexSignatureDeclaration | undefined ; // eslint-disable-line @typescript-eslint/unified-signatures
5083
+ /** @internal */ indexInfoToIndexSignatureDeclaration ( indexInfo : IndexInfo , enclosingDeclaration : Node | undefined , flags : NodeBuilderFlags | undefined , internalFlags ?: InternalNodeBuilderFlags | undefined , tracker ?: SymbolTracker ) : IndexSignatureDeclaration | undefined ; // eslint-disable-line @typescript-eslint/unified-signatures
5084
5084
/** Note that the resulting nodes cannot be checked. */
5085
5085
symbolToEntityName ( symbol : Symbol , meaning : SymbolFlags , enclosingDeclaration : Node | undefined , flags : NodeBuilderFlags | undefined ) : EntityName | undefined ;
5086
5086
/** Note that the resulting nodes cannot be checked. */
@@ -5090,7 +5090,7 @@ export interface TypeChecker {
5090
5090
*
5091
5091
* @internal
5092
5092
*/
5093
- symbolToNode ( symbol : Symbol , meaning : SymbolFlags , enclosingDeclaration : Node | undefined , flags : NodeBuilderFlags | undefined ) : Node | undefined ;
5093
+ symbolToNode ( symbol : Symbol , meaning : SymbolFlags , enclosingDeclaration : Node | undefined , flags : NodeBuilderFlags | undefined , internalFlags : InternalNodeBuilderFlags | undefined ) : Node | undefined ;
5094
5094
/** Note that the resulting nodes cannot be checked. */
5095
5095
symbolToTypeParameterDeclarations ( symbol : Symbol , enclosingDeclaration : Node | undefined , flags : NodeBuilderFlags | undefined ) : NodeArray < TypeParameterDeclaration > | undefined ;
5096
5096
/** Note that the resulting nodes cannot be checked. */
@@ -5459,12 +5459,9 @@ export const enum NodeBuilderFlags {
5459
5459
AllowEmptyTuple = 1 << 19 ,
5460
5460
AllowUniqueESSymbolType = 1 << 20 ,
5461
5461
AllowEmptyIndexInfoType = 1 << 21 ,
5462
- /** @internal */ WriteComputedProps = 1 << 30 , // { [E.A]: 1 }
5463
- /** @internal */ NoSyntacticPrinter = 1 << 31 ,
5464
5462
// Errors (cont.)
5465
5463
AllowNodeModulesRelativePaths = 1 << 26 ,
5466
- /** @internal */ DoNotIncludeSymbolChain = 1 << 27 , // Skip looking up and printing an accessible symbol chain
5467
- /** @internal */ AllowUnresolvedNames = 1 << 32 ,
5464
+
5468
5465
5469
5466
IgnoreErrors = AllowThisInObjectLiteral | AllowQualifiedNameInPlaceOfIdentifier | AllowAnonymousIdentifier | AllowEmptyUnionOrIntersection | AllowEmptyTuple | AllowEmptyIndexInfoType | AllowNodeModulesRelativePaths ,
5470
5467
@@ -5474,6 +5471,16 @@ export const enum NodeBuilderFlags {
5474
5471
InInitialEntityName = 1 << 24 , // Set when writing the LHS of an entity name or entity name expression
5475
5472
}
5476
5473
5474
+ /** @internal */
5475
+ // dprint-ignore
5476
+ export const enum InternalNodeBuilderFlags {
5477
+ None = 0 ,
5478
+ WriteComputedProps = 1 << 0 , // { [E.A]: 1 }
5479
+ NoSyntacticPrinter = 1 << 1 ,
5480
+ DoNotIncludeSymbolChain = 1 << 2 , // Skip looking up and printing an accessible symbol chain
5481
+ AllowUnresolvedNames = 1 << 3 ,
5482
+ }
5483
+
5477
5484
// Ensure the shared flags between this and `NodeBuilderFlags` stay in alignment
5478
5485
// dprint-ignore
5479
5486
export const enum TypeFormatFlags {
@@ -5810,9 +5817,9 @@ export interface EmitResolver {
5810
5817
requiresAddingImplicitUndefined ( node : ParameterDeclaration ) : boolean ;
5811
5818
isExpandoFunctionDeclaration ( node : FunctionDeclaration | VariableDeclaration ) : boolean ;
5812
5819
getPropertiesOfContainerFunction ( node : Declaration ) : Symbol [ ] ;
5813
- createTypeOfDeclaration ( declaration : AccessorDeclaration | VariableLikeDeclaration | PropertyAccessExpression | ElementAccessExpression | BinaryExpression , enclosingDeclaration : Node , flags : NodeBuilderFlags , tracker : SymbolTracker ) : TypeNode | undefined ;
5814
- createReturnTypeOfSignatureDeclaration ( signatureDeclaration : SignatureDeclaration , enclosingDeclaration : Node , flags : NodeBuilderFlags , tracker : SymbolTracker ) : TypeNode | undefined ;
5815
- createTypeOfExpression ( expr : Expression , enclosingDeclaration : Node , flags : NodeBuilderFlags , tracker : SymbolTracker ) : TypeNode | undefined ;
5820
+ createTypeOfDeclaration ( declaration : AccessorDeclaration | VariableLikeDeclaration | PropertyAccessExpression | ElementAccessExpression | BinaryExpression , enclosingDeclaration : Node , flags : NodeBuilderFlags , internalFlags : InternalNodeBuilderFlags , tracker : SymbolTracker ) : TypeNode | undefined ;
5821
+ createReturnTypeOfSignatureDeclaration ( signatureDeclaration : SignatureDeclaration , enclosingDeclaration : Node , flags : NodeBuilderFlags , internalFlags : InternalNodeBuilderFlags , tracker : SymbolTracker ) : TypeNode | undefined ;
5822
+ createTypeOfExpression ( expr : Expression , enclosingDeclaration : Node , flags : NodeBuilderFlags , internalFlags : InternalNodeBuilderFlags , tracker : SymbolTracker ) : TypeNode | undefined ;
5816
5823
createLiteralConstValue ( node : VariableDeclaration | PropertyDeclaration | PropertySignature | ParameterDeclaration , tracker : SymbolTracker ) : Expression ;
5817
5824
isSymbolAccessible ( symbol : Symbol , enclosingDeclaration : Node | undefined , meaning : SymbolFlags | undefined , shouldComputeAliasToMarkVisible : boolean ) : SymbolAccessibilityResult ;
5818
5825
isEntityNameVisible ( entityName : EntityNameOrEntityNameExpression , enclosingDeclaration : Node ) : SymbolVisibilityResult ;
@@ -5829,7 +5836,7 @@ export interface EmitResolver {
5829
5836
getJsxFactoryEntity ( location ?: Node ) : EntityName | undefined ;
5830
5837
getJsxFragmentFactoryEntity ( location ?: Node ) : EntityName | undefined ;
5831
5838
isBindingCapturedByNode ( node : Node , decl : VariableDeclaration | BindingElement ) : boolean ;
5832
- getDeclarationStatementsForSourceFile ( node : SourceFile , flags : NodeBuilderFlags , tracker : SymbolTracker ) : Statement [ ] | undefined ;
5839
+ getDeclarationStatementsForSourceFile ( node : SourceFile , flags : NodeBuilderFlags , internalFlags : InternalNodeBuilderFlags , tracker : SymbolTracker ) : Statement [ ] | undefined ;
5833
5840
isImportRequiredByAugmentation ( decl : ImportDeclaration ) : boolean ;
5834
5841
isDefinitelyReferenceToGlobalSymbolObject ( node : Node ) : boolean ;
5835
5842
}
0 commit comments