Skip to content

Commit c388079

Browse files
committed
fix: add explicit typedef imports instead of declare global
Otherwise the `solr.d.ts` file had to be be open alongside the `index.js` file for typedef to work in vscode.
1 parent de78d6e commit c388079

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

src/index.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,16 @@
11
// @ts-check
2+
/**
3+
* Support for type checking and intellisense in vscode:
4+
* @typedef {import("./solr").SolrConfig} SolrConfig
5+
* @typedef {import("./solr").SolrData} SolrData
6+
* @typedef {import("./solr").SolrDocument} SolrDocument
7+
* @typedef {import("./solr").SolrResponse} SolrResponse
8+
* @typedef {import("./solr").DeleteQuery} DeleteQuery
9+
* @typedef {import("./solr").FieldProperties} FieldProperties
10+
* @typedef {import("./solr").FieldTypeProperties} FieldTypeProperties
11+
* @typedef {import("./solr").SolrQuery} SolrQuery
12+
*/
13+
214
const url = require("url")
315
const { default: axios } = require("axios")
416

0 commit comments

Comments
 (0)