Exposing more endpoints#3403
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR expands the public API surface by exposing additional checker endpoints (types/signatures utilities) through the Go session layer and the TypeScript client libraries.
Changes:
- Added new API methods/endpoints: resolved signature, non-nullable type, type-from-type-node, widened type, parameter type, array-like checks, and signature declaration printing.
- Exposed
NodeBuilderFlagsin the TypeScript API to support node/signature printing flags. - Added Go checker wrappers for newly exposed functionality.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| internal/checker/printer.go | Exposes SignatureToSignatureDeclaration via Checker. |
| internal/checker/exports.go | Exposes widened-type functionality via Checker. |
| internal/api/session.go | Routes and implements new API handlers for the added endpoints. |
| internal/api/proto.go | Adds method constants, unmarshalers, and request parameter types for new endpoints. |
| _packages/api/src/sync/api.ts | Adds sync client methods for new endpoints and exports NodeBuilderFlags. |
| _packages/api/src/async/api.ts | Adds async client methods for new endpoints and exports NodeBuilderFlags. |
| _packages/api/src/enums/nodeBuilderFlags.ts | Adds generated runtime NodeBuilderFlags enum values. |
| _packages/api/src/enums/nodeBuilderFlags.enum.ts | Adds generated TypeScript NodeBuilderFlags type enum. |
| // handleGetParameterType returns the type of a parameter at a given index in a signature. | ||
| func (s *Session) handleGetParameterType(ctx context.Context, params *GetParameterTypeParams) (*TypeResponse, error) { | ||
| setup, err := s.setupChecker(ctx, params.Snapshot, params.Project) | ||
| if err != nil { | ||
| return nil, err | ||
| } | ||
| defer setup.done() | ||
|
|
||
| sig, err := setup.sd.resolveSignatureHandle(params.Signature) | ||
| if err != nil { | ||
| return nil, err | ||
| } | ||
|
|
||
| t := setup.checker.GetTypeParameterAtPosition(sig, int(params.Index)) | ||
| if t == nil { | ||
| return nil, nil | ||
| } | ||
|
|
||
| return setup.sd.registerType(t), nil | ||
| } |
There was a problem hiding this comment.
This handler is documented and named to return a parameter type, but it calls GetTypeParameterAtPosition, which typically refers to a generic type parameter (e.g., T) rather than a function parameter’s type. Either switch to the checker API that returns the parameter type at position (commonly GetTypeAtPosition(signature, index)), or rename the endpoint/params/method to getTypeParameterAtPosition to match the implemented behavior.
There was a problem hiding this comment.
Name is same as that in Strada. The function returns the type of parameter as an index and not a generic type parameter.
There was a problem hiding this comment.
No, Copilot is right about this. The function you wrote here returns the type of a generic type parameter. The checker function you need to use is called getTypeAtPosition and isn't exported yet.
| sig, err := setup.sd.resolveSignatureHandle(params.Signature) | ||
| if err != nil { | ||
| return nil, err | ||
| } |
There was a problem hiding this comment.
params.Index is int32 and is directly cast to int without validation. Negative values (or out-of-range values) should be rejected with a clear error to avoid undefined behavior or downstream panics inside the checker. Consider validating params.Index >= 0 (and, if feasible, bounds-checking against the signature’s parameter count) and returning an error like invalid parameter index.
| } | |
| } | |
| if params.Index < 0 { | |
| return nil, fmt.Errorf("invalid parameter index") | |
| } |
| signatureToSignatureDeclaration(signature: Signature, kind: number, enclosingDeclaration?: Node, flags?: number): Node | undefined { | ||
| const binaryData = this.client.apiRequestBinary("signatureToSignatureDeclaration", { | ||
| snapshot: this.snapshotId, | ||
| project: this.projectId, | ||
| signature: signature.id, | ||
| kind, | ||
| location: enclosingDeclaration ? getNodeId(enclosingDeclaration) : undefined, | ||
| flags, | ||
| }); |
There was a problem hiding this comment.
The TS client method is typed with kind: number and flags?: number, but this endpoint is semantically tied to specific enums (AST Kind/SyntaxKind for kind, and NodeBuilderFlags for flags). Since NodeBuilderFlags is already added to exports, update the method signature to use flags?: NodeBuilderFlags (and a stronger type for kind if available) to prevent accidental invalid values and improve IntelliSense.
| async signatureToSignatureDeclaration(signature: Signature, kind: number, enclosingDeclaration?: Node, flags?: number): Promise<Node | undefined> { | ||
| const binaryData = await this.client.apiRequestBinary("signatureToSignatureDeclaration", { | ||
| snapshot: this.snapshotId, | ||
| project: this.projectId, | ||
| signature: signature.id, | ||
| kind, | ||
| location: enclosingDeclaration ? getNodeId(enclosingDeclaration) : undefined, | ||
| flags, | ||
| }); |
There was a problem hiding this comment.
Same typing issue as the sync client: kind/flags are exposed as plain numbers. Prefer flags?: NodeBuilderFlags (and a stronger enum type for kind if available) so callers don’t accidentally pass unrelated constants.
| // GetNonNullableTypeParams returns the type with null and undefined removed. | ||
| type GetNonNullableTypeParams struct { | ||
| Snapshot Handle[project.Snapshot] `json:"snapshot"` | ||
| Project Handle[project.Project] `json:"project"` | ||
| Type Handle[checker.Type] `json:"type"` | ||
| } | ||
|
|
||
| // GetTypeFromTypeNodeParams returns the type for a type node. | ||
| type GetTypeFromTypeNodeParams struct { | ||
| Snapshot Handle[project.Snapshot] `json:"snapshot"` | ||
| Project Handle[project.Project] `json:"project"` | ||
| Location Handle[ast.Node] `json:"location"` | ||
| } | ||
|
|
||
| // GetWidenedTypeParams returns the widened type of a type. |
There was a problem hiding this comment.
These doc comments describe the result of the operation rather than what the params struct represents (e.g., “returns …”). For clarity and consistency, reword to something like: // GetNonNullableTypeParams are the parameters for the getNonNullableType method. (Similarly for GetTypeFromTypeNodeParams, GetWidenedTypeParams, and GetParameterTypeParams.)
| // GetNonNullableTypeParams returns the type with null and undefined removed. | |
| type GetNonNullableTypeParams struct { | |
| Snapshot Handle[project.Snapshot] `json:"snapshot"` | |
| Project Handle[project.Project] `json:"project"` | |
| Type Handle[checker.Type] `json:"type"` | |
| } | |
| // GetTypeFromTypeNodeParams returns the type for a type node. | |
| type GetTypeFromTypeNodeParams struct { | |
| Snapshot Handle[project.Snapshot] `json:"snapshot"` | |
| Project Handle[project.Project] `json:"project"` | |
| Location Handle[ast.Node] `json:"location"` | |
| } | |
| // GetWidenedTypeParams returns the widened type of a type. | |
| // GetNonNullableTypeParams are the parameters for the getNonNullableType method. | |
| type GetNonNullableTypeParams struct { | |
| Snapshot Handle[project.Snapshot] `json:"snapshot"` | |
| Project Handle[project.Project] `json:"project"` | |
| Type Handle[checker.Type] `json:"type"` | |
| } | |
| // GetTypeFromTypeNodeParams are the parameters for the getTypeFromTypeNode method. | |
| type GetTypeFromTypeNodeParams struct { | |
| Snapshot Handle[project.Snapshot] `json:"snapshot"` | |
| Project Handle[project.Project] `json:"project"` | |
| Location Handle[ast.Node] `json:"location"` | |
| } | |
| // GetWidenedTypeParams are the parameters for the getWidenedType method. |
…o navyasingh/updatingExport
…o navyasingh/updatingExport
…o navyasingh/updatingExport
…o navyasingh/updatingExport
…o dev/navyasingh/moreEndpoints
| @@ -0,0 +1,36 @@ | |||
| // Code generated by Herebyfile.mjs generate:enums from internal/nodebuilder/types.go. DO NOT EDIT. | |||
There was a problem hiding this comment.
I don't see a change to Herebyfile; where did this enum come from?
There was a problem hiding this comment.
Updated that and re-generated
| } | ||
|
|
||
| // NodeReferenceInfo is a compact representation of a node-backed reference entry suitable for sending over the wire. | ||
| type NodeReferenceInfo struct { |
There was a problem hiding this comment.
This type seems incredibly specialized to a single use case despite a very generic name. I think this should just be replaced by Handle[ast.Node].
There was a problem hiding this comment.
I'll address all find-all-references api comments in a separate PR
andrewbranch
left a comment
There was a problem hiding this comment.
All the find-all-reference related APIs need to be significantly reworked in order to be useful outside of your specific use case.
| } | ||
|
|
||
| // handleProbablyUsesSemicolons checks whether a source file probably uses semicolons. | ||
| func (s *Session) handleProbablyUsesSemicolons(ctx context.Context, params *GetSourceFileParams) (bool, error) { |
There was a problem hiding this comment.
This seems like something that doesn't need to be answered over the wire.
|
|
||
| // handleSomeSignatureUsage checks if any usage of a signature has more arguments than the given parameter index, | ||
| // or if any reference is a non-call usage. Ports Strada's FindAllReferences.Core.someSignatureUsage. | ||
| func (s *Session) handleSomeSignatureUsage(ctx context.Context, params *SomeSignatureUsageParams) (bool, error) { |
There was a problem hiding this comment.
This name doesn't make sense. The Strada function was so named because it took a predicate function that was called for each signature and returned a boolean the first time the predicate returns true, like Array.prototype.some. You can't pass a predicate function over the wire, so I assume you've baked in the particular predicate function you needed, but consequently the method is a misnomer and the implementation is so specific that no other API consumer could use it. Instead, you should just be using the API to get all the signature usages and then doing whatever analysis on the client side.
| } | ||
|
|
||
| // handleEachSymbolReferenceInFile returns positions of all references to a symbol in a file. | ||
| func (s *Session) handleEachSymbolReferenceInFile(ctx context.Context, params *IsSymbolReferencedInFileParams) ([]int, error) { |
There was a problem hiding this comment.
Similar issue; the name is no longer appropriate for the implementation because the Strada code took a callback so the name was evoking Array.prototype.forEach. This should be GetSymbolReferencesInFile and return a list of node handles to identifiers.
| } | ||
|
|
||
| // Get the source file from the node handle | ||
| _, _, _, path, err := parseNodeHandle(params.Definition) |
There was a problem hiding this comment.
It looks like this decoding is duplicated with node, err := s.resolveNodeHandle(setup.program, params.Definition) above
| func (s *Session) setupLanguageService(setup checkerSetup, projectHandle Handle[project.Project], activeFile string) (*ls.LanguageService, error) { | ||
| projectName := parseProjectHandle(projectHandle) | ||
| proj := setup.sd.snapshot.ProjectCollection.GetProjectByPath(projectName) |
There was a problem hiding this comment.
This shouldn't take a checkerSetup because it has to duplicate getting the project and program.
| type IsSymbolReferencedInFileParams struct { | ||
| Snapshot Handle[project.Snapshot] `json:"snapshot"` | ||
| Project Handle[project.Project] `json:"project"` | ||
| Definition Handle[ast.Node] `json:"definition"` |
There was a problem hiding this comment.
I don't think "definition" makes sense as a parameter to answer the question "is a symbol referenced in a file"—I would expect it to take a symbol and a file. It looks like Strada wants a "definition" identifier because the comment says "Used as a quick check for whether a symbol is used at all in a file (besides its definition)." But the Strada API also doesn't take a symbol as an input; it just takes the identifier. So the original name is bad, but the contract is basically "give me the identifier of a declaration and I'll tell you if it's used anywhere else in the same file," which is fairly coherent. That said, it just uses eachSymbolReferenceInFile which I've suggested use expose as GetSymbolReferencesInFile, so I'm not sure it's worth it to expose this separate method.
| } | ||
|
|
||
| // handleGetReferencedSymbolsForNode finds all references to a node and returns compact NodeReferenceInfo entries. | ||
| func (s *Session) handleGetReferencedSymbolsForNode(ctx context.Context, params *GetReferencedSymbolsForNodeParams) ([]NodeReferenceInfo, error) { |
There was a problem hiding this comment.
I already suggested you delete the NodeReferenceInfo type, but now I'm seeing that it's only used on a method called GetReferencedSymbolsForNode, but the return type isn't even anything close to a symbol. I'm totally confused by this.
This reverts commit 66c5058.
| } | ||
|
|
||
| if params.Index < 0 { | ||
| return nil, fmt.Errorf("%w: invalid parameter index", ErrClientError) |
There was a problem hiding this comment.
The client error omits the offending index value, which makes debugging harder. Include params.Index in the message (and keep it classified as ErrClientError), e.g. invalid parameter index: <value>.
| return nil, fmt.Errorf("%w: invalid parameter index", ErrClientError) | |
| return nil, fmt.Errorf("%w: invalid parameter index: %d", ErrClientError, params.Index) |
| return candidates | ||
| } | ||
|
|
||
| // GetTypeAtPosition returns the type of a parameter at a given index in a signature. |
There was a problem hiding this comment.
The exported method name GetTypeAtPosition is easily confused with the existing location-based getTypeAtPosition/getTypeAtLocation API surface. Either (a) rename this exported wrapper to something signature-specific (e.g., GetSignatureParameterTypeAtPosition), or (b) at least adjust the doc comment to precisely match the underlying semantics (parameter vs. other signature positions) to reduce ambiguity for API consumers.
| // GetTypeAtPosition returns the type of a parameter at a given index in a signature. | |
| // GetTypeAtPosition returns the type at the given position within a signature. | |
| // The pos argument is a signature position (for example, a parameter index), not | |
| // a source-code position or AST location. |
| export var NodeBuilderFlags: any; | ||
| (function (NodeBuilderFlags) { | ||
| NodeBuilderFlags[NodeBuilderFlags["None"] = 0] = "None"; | ||
| NodeBuilderFlags[NodeBuilderFlags["NoTruncation"] = 1] = "NoTruncation"; | ||
| NodeBuilderFlags[NodeBuilderFlags["WriteArrayAsGenericType"] = 2] = "WriteArrayAsGenericType"; | ||
| NodeBuilderFlags[NodeBuilderFlags["GenerateNamesForShadowedTypeParams"] = 4] = "GenerateNamesForShadowedTypeParams"; | ||
| NodeBuilderFlags[NodeBuilderFlags["UseStructuralFallback"] = 8] = "UseStructuralFallback"; | ||
| NodeBuilderFlags[NodeBuilderFlags["ForbidIndexedAccessSymbolReferences"] = 16] = "ForbidIndexedAccessSymbolReferences"; | ||
| NodeBuilderFlags[NodeBuilderFlags["WriteTypeArgumentsOfSignature"] = 32] = "WriteTypeArgumentsOfSignature"; | ||
| NodeBuilderFlags[NodeBuilderFlags["UseFullyQualifiedType"] = 64] = "UseFullyQualifiedType"; | ||
| NodeBuilderFlags[NodeBuilderFlags["UseOnlyExternalAliasing"] = 128] = "UseOnlyExternalAliasing"; | ||
| NodeBuilderFlags[NodeBuilderFlags["SuppressAnyReturnType"] = 256] = "SuppressAnyReturnType"; | ||
| NodeBuilderFlags[NodeBuilderFlags["WriteTypeParametersInQualifiedName"] = 512] = "WriteTypeParametersInQualifiedName"; | ||
| NodeBuilderFlags[NodeBuilderFlags["MultilineObjectLiterals"] = 1024] = "MultilineObjectLiterals"; | ||
| NodeBuilderFlags[NodeBuilderFlags["WriteClassExpressionAsTypeLiteral"] = 2048] = "WriteClassExpressionAsTypeLiteral"; | ||
| NodeBuilderFlags[NodeBuilderFlags["UseTypeOfFunction"] = 4096] = "UseTypeOfFunction"; | ||
| NodeBuilderFlags[NodeBuilderFlags["OmitParameterModifiers"] = 8192] = "OmitParameterModifiers"; | ||
| NodeBuilderFlags[NodeBuilderFlags["UseAliasDefinedOutsideCurrentScope"] = 16384] = "UseAliasDefinedOutsideCurrentScope"; | ||
| NodeBuilderFlags[NodeBuilderFlags["UseSingleQuotesForStringLiteralType"] = 268435456] = "UseSingleQuotesForStringLiteralType"; | ||
| NodeBuilderFlags[NodeBuilderFlags["NoTypeReduction"] = 536870912] = "NoTypeReduction"; | ||
| NodeBuilderFlags[NodeBuilderFlags["UseInstantiationExpressions"] = 1073741824] = "UseInstantiationExpressions"; | ||
| NodeBuilderFlags[NodeBuilderFlags["OmitThisParameter"] = 33554432] = "OmitThisParameter"; | ||
| NodeBuilderFlags[NodeBuilderFlags["WriteCallStyleSignature"] = 134217728] = "WriteCallStyleSignature"; | ||
| NodeBuilderFlags[NodeBuilderFlags["AllowThisInObjectLiteral"] = 32768] = "AllowThisInObjectLiteral"; | ||
| NodeBuilderFlags[NodeBuilderFlags["AllowQualifiedNameInPlaceOfIdentifier"] = 65536] = "AllowQualifiedNameInPlaceOfIdentifier"; | ||
| NodeBuilderFlags[NodeBuilderFlags["AllowAnonymousIdentifier"] = 131072] = "AllowAnonymousIdentifier"; | ||
| NodeBuilderFlags[NodeBuilderFlags["AllowEmptyUnionOrIntersection"] = 262144] = "AllowEmptyUnionOrIntersection"; | ||
| NodeBuilderFlags[NodeBuilderFlags["AllowEmptyTuple"] = 524288] = "AllowEmptyTuple"; | ||
| NodeBuilderFlags[NodeBuilderFlags["AllowUniqueESSymbolType"] = 1048576] = "AllowUniqueESSymbolType"; | ||
| NodeBuilderFlags[NodeBuilderFlags["AllowEmptyIndexInfoType"] = 2097152] = "AllowEmptyIndexInfoType"; | ||
| NodeBuilderFlags[NodeBuilderFlags["AllowNodeModulesRelativePaths"] = 67108864] = "AllowNodeModulesRelativePaths"; | ||
| NodeBuilderFlags[NodeBuilderFlags["IgnoreErrors"] = 70221824] = "IgnoreErrors"; | ||
| NodeBuilderFlags[NodeBuilderFlags["InObjectTypeLiteral"] = 4194304] = "InObjectTypeLiteral"; | ||
| NodeBuilderFlags[NodeBuilderFlags["InTypeAlias"] = 8388608] = "InTypeAlias"; | ||
| NodeBuilderFlags[NodeBuilderFlags["InInitialEntityName"] = 16777216] = "InInitialEntityName"; | ||
| })(NodeBuilderFlags || (NodeBuilderFlags = {})); |
There was a problem hiding this comment.
NodeBuilderFlags is generated as any here, which removes type safety precisely where the API surface uses it as a parameter type (e.g., signatureToSignatureDeclaration(..., flags?: NodeBuilderFlags)). Consider importing/using the generated typed enum (nodeBuilderFlags.enum.ts) in the API layer, or adjusting generation so #enums/nodeBuilderFlags resolves to the typed enum while still providing a runtime value export.
| export var NodeBuilderFlags: any; | |
| (function (NodeBuilderFlags) { | |
| NodeBuilderFlags[NodeBuilderFlags["None"] = 0] = "None"; | |
| NodeBuilderFlags[NodeBuilderFlags["NoTruncation"] = 1] = "NoTruncation"; | |
| NodeBuilderFlags[NodeBuilderFlags["WriteArrayAsGenericType"] = 2] = "WriteArrayAsGenericType"; | |
| NodeBuilderFlags[NodeBuilderFlags["GenerateNamesForShadowedTypeParams"] = 4] = "GenerateNamesForShadowedTypeParams"; | |
| NodeBuilderFlags[NodeBuilderFlags["UseStructuralFallback"] = 8] = "UseStructuralFallback"; | |
| NodeBuilderFlags[NodeBuilderFlags["ForbidIndexedAccessSymbolReferences"] = 16] = "ForbidIndexedAccessSymbolReferences"; | |
| NodeBuilderFlags[NodeBuilderFlags["WriteTypeArgumentsOfSignature"] = 32] = "WriteTypeArgumentsOfSignature"; | |
| NodeBuilderFlags[NodeBuilderFlags["UseFullyQualifiedType"] = 64] = "UseFullyQualifiedType"; | |
| NodeBuilderFlags[NodeBuilderFlags["UseOnlyExternalAliasing"] = 128] = "UseOnlyExternalAliasing"; | |
| NodeBuilderFlags[NodeBuilderFlags["SuppressAnyReturnType"] = 256] = "SuppressAnyReturnType"; | |
| NodeBuilderFlags[NodeBuilderFlags["WriteTypeParametersInQualifiedName"] = 512] = "WriteTypeParametersInQualifiedName"; | |
| NodeBuilderFlags[NodeBuilderFlags["MultilineObjectLiterals"] = 1024] = "MultilineObjectLiterals"; | |
| NodeBuilderFlags[NodeBuilderFlags["WriteClassExpressionAsTypeLiteral"] = 2048] = "WriteClassExpressionAsTypeLiteral"; | |
| NodeBuilderFlags[NodeBuilderFlags["UseTypeOfFunction"] = 4096] = "UseTypeOfFunction"; | |
| NodeBuilderFlags[NodeBuilderFlags["OmitParameterModifiers"] = 8192] = "OmitParameterModifiers"; | |
| NodeBuilderFlags[NodeBuilderFlags["UseAliasDefinedOutsideCurrentScope"] = 16384] = "UseAliasDefinedOutsideCurrentScope"; | |
| NodeBuilderFlags[NodeBuilderFlags["UseSingleQuotesForStringLiteralType"] = 268435456] = "UseSingleQuotesForStringLiteralType"; | |
| NodeBuilderFlags[NodeBuilderFlags["NoTypeReduction"] = 536870912] = "NoTypeReduction"; | |
| NodeBuilderFlags[NodeBuilderFlags["UseInstantiationExpressions"] = 1073741824] = "UseInstantiationExpressions"; | |
| NodeBuilderFlags[NodeBuilderFlags["OmitThisParameter"] = 33554432] = "OmitThisParameter"; | |
| NodeBuilderFlags[NodeBuilderFlags["WriteCallStyleSignature"] = 134217728] = "WriteCallStyleSignature"; | |
| NodeBuilderFlags[NodeBuilderFlags["AllowThisInObjectLiteral"] = 32768] = "AllowThisInObjectLiteral"; | |
| NodeBuilderFlags[NodeBuilderFlags["AllowQualifiedNameInPlaceOfIdentifier"] = 65536] = "AllowQualifiedNameInPlaceOfIdentifier"; | |
| NodeBuilderFlags[NodeBuilderFlags["AllowAnonymousIdentifier"] = 131072] = "AllowAnonymousIdentifier"; | |
| NodeBuilderFlags[NodeBuilderFlags["AllowEmptyUnionOrIntersection"] = 262144] = "AllowEmptyUnionOrIntersection"; | |
| NodeBuilderFlags[NodeBuilderFlags["AllowEmptyTuple"] = 524288] = "AllowEmptyTuple"; | |
| NodeBuilderFlags[NodeBuilderFlags["AllowUniqueESSymbolType"] = 1048576] = "AllowUniqueESSymbolType"; | |
| NodeBuilderFlags[NodeBuilderFlags["AllowEmptyIndexInfoType"] = 2097152] = "AllowEmptyIndexInfoType"; | |
| NodeBuilderFlags[NodeBuilderFlags["AllowNodeModulesRelativePaths"] = 67108864] = "AllowNodeModulesRelativePaths"; | |
| NodeBuilderFlags[NodeBuilderFlags["IgnoreErrors"] = 70221824] = "IgnoreErrors"; | |
| NodeBuilderFlags[NodeBuilderFlags["InObjectTypeLiteral"] = 4194304] = "InObjectTypeLiteral"; | |
| NodeBuilderFlags[NodeBuilderFlags["InTypeAlias"] = 8388608] = "InTypeAlias"; | |
| NodeBuilderFlags[NodeBuilderFlags["InInitialEntityName"] = 16777216] = "InInitialEntityName"; | |
| })(NodeBuilderFlags || (NodeBuilderFlags = {})); | |
| export enum NodeBuilderFlags { | |
| None = 0, | |
| NoTruncation = 1, | |
| WriteArrayAsGenericType = 2, | |
| GenerateNamesForShadowedTypeParams = 4, | |
| UseStructuralFallback = 8, | |
| ForbidIndexedAccessSymbolReferences = 16, | |
| WriteTypeArgumentsOfSignature = 32, | |
| UseFullyQualifiedType = 64, | |
| UseOnlyExternalAliasing = 128, | |
| SuppressAnyReturnType = 256, | |
| WriteTypeParametersInQualifiedName = 512, | |
| MultilineObjectLiterals = 1024, | |
| WriteClassExpressionAsTypeLiteral = 2048, | |
| UseTypeOfFunction = 4096, | |
| OmitParameterModifiers = 8192, | |
| UseAliasDefinedOutsideCurrentScope = 16384, | |
| UseSingleQuotesForStringLiteralType = 268435456, | |
| NoTypeReduction = 536870912, | |
| UseInstantiationExpressions = 1073741824, | |
| OmitThisParameter = 33554432, | |
| WriteCallStyleSignature = 134217728, | |
| AllowThisInObjectLiteral = 32768, | |
| AllowQualifiedNameInPlaceOfIdentifier = 65536, | |
| AllowAnonymousIdentifier = 131072, | |
| AllowEmptyUnionOrIntersection = 262144, | |
| AllowEmptyTuple = 524288, | |
| AllowUniqueESSymbolType = 1048576, | |
| AllowEmptyIndexInfoType = 2097152, | |
| AllowNodeModulesRelativePaths = 67108864, | |
| IgnoreErrors = 70221824, | |
| InObjectTypeLiteral = 4194304, | |
| InTypeAlias = 8388608, | |
| InInitialEntityName = 16777216, | |
| } |
| } | ||
|
|
||
| var enclosingDeclaration *ast.Node | ||
| if params.Location != "" { |
There was a problem hiding this comment.
Nit: the param should be called EnclosingDeclaration
There was a problem hiding this comment.
I'll fix this in the next one
No description provided.