Skip to content

fix: types.ts SnapshotGetRequest #1925

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

fix: types.ts SnapshotGetRequest #1925

wants to merge 1 commit into from

Conversation

patrickjmeurer
Copy link

@patrickjmeurer patrickjmeurer commented Jun 28, 2023

Changing the type that is causing error on NestJS build

@cla-checker-service
Copy link

❌ Author of the following commits did not sign a Contributor Agreement:
f5e7edc

Please, read and sign the above mentioned agreement if you want to contribute to this project

@aitherios
Copy link

Just as a suggestion. This can also be sorted out by importing the integer type from the types module. Patch bellow:

diff --git a/api/requestParams.d.ts b/api/requestParams.d.ts
index ccd2889e830d15eed9006ddf633bc0bb5081140d..bcaaa8bbb32c735a4dc7f2915c3b2aa2472d5f11 100644
--- a/api/requestParams.d.ts
+++ b/api/requestParams.d.ts
@@ -18,6 +18,7 @@
  */
 
 import { RequestBody, RequestNDBody } from '../lib/Transport'
+import { integer } from './types'
 
 export interface Generic {
   method?: string;

@weiwong
Copy link

weiwong commented Jun 29, 2023

Following @aitherios's suggestion, I think we should update generateRequestTypes.js instead, since requestParams.d.ts is generated using that script:

diff --git a/scripts/utils/generateRequestTypes.js b/scripts/utils/generateRequestTypes.js
index 854e9ebc..2fbf9fc6 100644
--- a/scripts/utils/generateRequestTypes.js
+++ b/scripts/utils/generateRequestTypes.js
@@ -45,6 +45,7 @@ function generate (version, api) {
  */
 
 import { RequestBody, RequestNDBody } from '../lib/Transport'
+import { integer } from './types'
 
 export interface Generic {
   method?: string;

@JoshMock
Copy link
Member

Thanks for the contribution @potreco. These lines of code are generated from the Elasticsearch spec, so I was able to do a more permanent fix to the generator and the code in #1927.

@JoshMock JoshMock closed this Jun 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants