Skip to content

[js/web] set noUnusedParameters to true and fix a few bugs #18404

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

Merged
merged 1 commit into from
Nov 15, 2023

Conversation

fs-eire
Copy link
Contributor

@fs-eire fs-eire commented Nov 11, 2023

Description

  • set tsconfig "noUnusedParameters" to true and fix a few bugs discovered by typescript.
    how unused parameter is fixed:
    • for most code (webgl), add underscore as prefix, which is the standard ignore pattern for typescript check.
    • remove unused parameter from function and modify corresponding function calls (jsep)
    • fix a bug in ArgMinMax: this 2 operators do not have more than one input(s) so the createArgMinMaxAttributesFromInputs() is removed.
  • add proxy main.ts into typescript check and fix a bug in parameter passing
    • fixed run() function call and add typecheck fix (hack)

@satyajandhyala satyajandhyala added the ep:WebGPU ort-web webgpu provider label Nov 13, 2023
@satyajandhyala
Copy link
Contributor

Is the leading '_' only required for the first parameter?

@fs-eire
Copy link
Contributor Author

fs-eire commented Nov 13, 2023

Is the leading '_' only required for the first parameter?

the leading '_' tells typescript that I know this parameter is not used and I intend to do so. So typescript will no longer warn on that parameter. it does not need to be the first parameter.

@satyajandhyala satyajandhyala merged commit 586f06f into main Nov 15, 2023
@satyajandhyala satyajandhyala deleted the fs-eire/ts-noUnusedParameters branch November 15, 2023 17:16
kleiti pushed a commit to kleiti/onnxruntime that referenced this pull request Mar 22, 2024
…#18404)

### Description
- set tsconfig "noUnusedParameters" to `true` and fix a few bugs
discovered by typescript.
   how unused parameter is fixed:
- for most code (webgl), add underscore as prefix, which is the standard
ignore pattern for typescript check.
- remove unused parameter from function and modify corresponding
function calls (jsep)
- fix a bug in ArgMinMax: this 2 operators do not have more than one
input(s) so the `createArgMinMaxAttributesFromInputs()` is removed.
- add proxy main.ts into typescript check and fix a bug in parameter
passing
   - fixed `run()` function call and add typecheck fix (hack)
siweic0 pushed a commit to siweic0/onnxruntime-web that referenced this pull request May 9, 2024
…#18404)

### Description
- set tsconfig "noUnusedParameters" to `true` and fix a few bugs
discovered by typescript.
   how unused parameter is fixed:
- for most code (webgl), add underscore as prefix, which is the standard
ignore pattern for typescript check.
- remove unused parameter from function and modify corresponding
function calls (jsep)
- fix a bug in ArgMinMax: this 2 operators do not have more than one
input(s) so the `createArgMinMaxAttributesFromInputs()` is removed.
- add proxy main.ts into typescript check and fix a bug in parameter
passing
   - fixed `run()` function call and add typecheck fix (hack)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ep:WebGPU ort-web webgpu provider
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants