Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
PizieDust committed Oct 22, 2024
1 parent 9c17c78 commit 26fdb8a
Showing 1 changed file with 17 additions and 21 deletions.
38 changes: 17 additions & 21 deletions ocaml-lsp-server/docs/ocamllsp/typeSearch-spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,26 +30,22 @@ export interface TypeSearchParams extends TexDocumentPositionParams
- `with_doc`: If to return documentation information or not

## Response

```js
result: TypeSearch | null
export interface TypeSearch {
type t = Query_protocol.type_search_result list
```json
{
[
"name": string,
"typ": string,
"loc": Range,
"doc": string,
"cost": int,
"constructible" : string
]
}
```
- `t`: A list of types that match the query.
```
type Query_protocol.type_search_result =
{
"name": string; // The fully qualified name of this result.,
"typ": string; // The signature of this result,
"loc": { // The location of the definition of this result in the source code.
"end": { "character": int, "line": int },
"start": { "character": int, "line": int }
},
"doc": string // Optional documentation associated with this result.,
"cost": int; // A numeric value representing the "cost" or distance between this result and the query.
constructible : string; // A constructible form or template that can be used to invoke this result
}
```
```
- name: The fully qualified name of this result.,
- typ: The signature of this result,
- loc: The location of the definition of this result in the source code.,
- doc: Optional documentation associated with this result.,
- cost: A numeric value representing the "cost" or distance between this result and the query.
- constructible: A constructible form or template that can be used to invoke this result
- A response with null result is returned if no entries are found.

0 comments on commit 26fdb8a

Please sign in to comment.