Skip to content
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

Fix most new vue typescript errors discovered in #19851 #19862

Merged
merged 12 commits into from
Mar 21, 2025

Conversation

jmchilton
Copy link
Member

@dannon updated the dependencies in #19851 and it discovered more Vue typescript typing errors. I think this should fix those. Also one follow up for a single error remaining after the Dataset Source modeling stuff #19666.

How to test the changes?

(Select all options that apply)

  • This is a refactoring of components with existing test coverage.

License

  • I agree to license these and all my past contributions to the core galaxy codebase under the MIT license.

Sorry, something went wrong.

src/components/History/Layout/DetailsLayout.vue:98:9 - error TS2322: Type 'string | undefined' is not assignable to type 'string'.
  Type 'undefined' is not assignable to type 'string'.

98         name: props.name,
           ~~~~
src/components/History/Layout/DetailsLayout.vue:99:9 - error TS2322: Type 'string | undefined' is not assignable to type 'string | null'.
  Type 'undefined' is not assignable to type 'string | null'.

99         annotation: props.annotation,
           ~~~~~~~~~~

  src/components/History/Layout/DetailsLayout.vue:47:40
    47 const localProps = ref<{ name: string; annotation: string | null; tags: string[] }>({
                                              ~~~~~~~~~~
    The expected type comes from property 'annotation' which is declared here on type '{ name: string; annotation: string | null; tags: string[]; }'
src/components/History/Layout/DetailsLayout.vue:100:9 - error TS2322: Type 'string[] | undefined' is not assignable to type 'string[]'.
  Type 'undefined' is not assignable to type 'string[]'.

100         tags: props.tags,
            ~~~~

  src/components/History/Layout/DetailsLayout.vue:47:67
    47 const localProps = ref<{ name: string; annotation: string | null; tags: string[] }>({
                                                                         ~~~~
    The expected type comes from property 'tags' which is declared here on type '{ name: string; annotation: string | null; tags: string[]; }'
src/components/History/Layout/DetailsLayout.vue:124:17 - error TS2322: Type 'string | undefined' is not assignable to type 'string'.
  Type 'undefined' is not assignable to type 'string'.

124                 v-model="clickToEditName"
                    ~~~~~~~

  src/components/Collections/common/ClickToEdit.vue:8:5
    8     value: string;
          ~~~~~
    The expected type comes from property 'value' which is declared here on type 'Readonly<Partial<{}> & Omit<Readonly<ExtractPropTypes<__VLS_TypePropsToOption<Props>>>, never>> & Record<...>'
src/components/Login/LoginForm.vue:84:9 - error TS2322: Type 'string | undefined' is not assignable to type 'string | null'.
  Type 'undefined' is not assignable to type 'string | null'.

84         redirect = props.redirect;
           ~~~~~~~~
src/components/Markdown/MarkdownDialog.vue:133:73 - error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'.
  Type 'undefined' is not assignable to type 'string'.

133         ["history_dataset_id", "history_dataset_collection_id"].indexOf(props.argumentType) >= 0 ? "output" : "step";
                                                                            ~~~~~~~~~~~~~~~~~~
src/components/User/DiskUsage/Management/Cleanup/CleanupResultDialog.vue:28:16 - error TS18048: 'props.result' is possibly 'undefined'.

28     } else if (props.result.isPartialSuccess) {
                  ~~~~~~~~~~~~
src/components/User/DiskUsage/Management/Cleanup/CleanupResultDialog.vue:30:16 - error TS18048: 'props.result' is possibly 'undefined'.

30     } else if (props.result.success) {
                  ~~~~~~~~~~~~
src/components/User/DiskUsage/Management/Cleanup/ReviewCleanupDialog.vue:168:30 - error TS18048: 'props.operation' is possibly 'undefined'.

168         const result = await props.operation.fetchItems(options);
                                 ~~~~~~~~~~~~~~~

src/components/User/DiskUsage/Management/Cleanup/ReviewCleanupDialog.vue:177:28 - error TS18048: 'props.operation' is possibly 'undefined'.

177     const allItems = await props.operation.fetchItems(
                               ~~~~~~~~~~~~~~~
src/components/Workflow/Run/WorkflowRunFormSimple.vue:267:34 - error TS2322: Type 'string | null' is not assignable to type 'string | undefined'.
  Type 'null' is not assignable to type 'string | undefined'.

267                                 :invocation-preferred-object-store-id="preferredObjectStoreId"
                                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  src/components/Workflow/Run/WorkflowStorageConfiguration.vue:65:9
    65         invocationPreferredObjectStoreId: {
               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    66             type: String,
       ~~~~~~~~~~~~~~~~~~~~~~~~~
    67             default: null,
       ~~~~~~~~~~~~~~~~~~~~~~~~~~
    68         },
       ~~~~~~~~~
@jmchilton jmchilton changed the title Fix most new vue typescript error discovered in #19851 Fix most new vue typescript errors discovered in #19851 Mar 20, 2025
@jmchilton jmchilton marked this pull request as ready for review March 20, 2025 18:43
@github-actions github-actions bot added this to the 25.0 milestone Mar 20, 2025
@mvdbeek mvdbeek merged commit cb97692 into galaxyproject:dev Mar 21, 2025
33 of 35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants