mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-06 22:35:57 +08:00
Fix elastic.js typings. Adding module and namespace exports. (#14152)
* Fix elastic.js typings namespace from 'elasticjs' to 'elastic.js'. This will allow using 'import' statement against elastic.js like so: import * as elasticjs from 'elastic.js'; This also makes using this typings to be TSlint "no-var-require" rule compliant. * Export elasticjs namespace.
This commit is contained in:
committed by
Mohamed Hegazy
parent
3357f1a623
commit
756433aeb4
@@ -1,3 +1,5 @@
|
||||
import * as elasticjs from 'elastic.js';
|
||||
|
||||
let body = new elasticjs.Request({})
|
||||
.query(new elasticjs.MatchQuery('title_field', 'testQuery'))
|
||||
.facet(new elasticjs.TermsFacet('tags').field('tags'))
|
||||
|
||||
4
elastic.js/index.d.ts
vendored
4
elastic.js/index.d.ts
vendored
@@ -3,6 +3,10 @@
|
||||
// Definitions by: Oleksii Trekhleb <https://ua.linkedin.com/in/trekhleb>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export = elasticjs;
|
||||
|
||||
export as namespace elasticjs;
|
||||
|
||||
declare module elasticjs {
|
||||
|
||||
export interface Facet {}
|
||||
|
||||
Reference in New Issue
Block a user