You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by "weilai201 (via GitHub)" <gi...@apache.org> on 2024/12/10 09:46:14 UTC
Re: [I] [Question] [Module Name] When dolphinscheduler-ui runs the pnpm run build:prod command, an assignment type error occurs. [dolphinscheduler]
weilai201 commented on issue #16601:
URL: https://github.com/apache/dolphinscheduler/issues/16601#issuecomment-2531034734
I have the same problem!
```
> vue-tsc --noEmit && vite build --mode production
src/views/datasource/list/use-form.ts:303:7 - error TS2322: Type 'string | object' is not assignable to type 'string'.
Type 'object' is not assignable to type 'string'.
303 other: values.other ? JSON.stringify(values.other) : values.other
~~~~~
src/views/datasource/list/types.ts:26:3
26 other?: string
~~~~~
The expected type comes from property 'other' which is declared here on type '{ other?: string; id?: number; name?: string; type?: IDataBase; label?: IDataBaseLabel; userName?: string; mode?: string; password?: string; database?: string; note?: string; host?: string; ... 13 more ...; datawarehouse?: string; }'
src/views/projects/task/components/node/fields/use-dependent.ts:350:50 - error TS2339: Property 'dependItemList' does not exist on type '{}'.
350 const itemListOptions = options?.dependItemList || []
~~~~~~~~~~~~~~
src/views/projects/task/components/node/fields/use-dependent.ts:356:25 - error TS2339: Property 'dependItemList' does not exist on type '{}'.
356 options.dependItemList = itemListOptions
~~~~~~~~~~~~~~
src/views/projects/task/components/node/fields/use-dependent.ts:357:17 - error TS2741: Property 'dependItemList' is missing in type '{}' but required in type '{ dependItemList: { dependentTypeOptions?: { label: string; value: string | number; }[]; definitionCodeOptions?: { label: string; value: string | number; }[]; depTaskCodeOptions?: { label: string; value: string | number; }[]; dateOptions?: { ...; }[]; }[]; }'.
357 selectOptions.value[i] = options
~~~~~~~~~~~~~~~~~~~~~~
src/views/projects/task/components/node/types.ts:93:3
93 dependItemList: IDependentItemOptions[]
~~~~~~~~~~~~~~
'dependItemList' is declared here.
src/views/projects/task/components/node/tasks/use-dependent.ts:33:26 - error TS2352: Conversion of type '{ name: string; taskPriority?: string; isCache?: "YES" | "NO"; timeoutFlag: false | "OPEN" | "CLOSE"; timeoutNotifyStrategy: string | undefined[]; taskParams?: ITaskParams; ... 279 more ...; timeoutShowFlag: boolean; }' to type 'INodeData' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
Types of property 'isCache' are incompatible.
Type 'string' is not comparable to type 'boolean'.
33 const model = reactive({
~
34 taskType: 'DEPENDENT',
~~~~~~~~~~~~~~~~~~~~~~~~~~
...
53 ...data
~~~~~~~~~~~
54 } as INodeData)
~~~~~~~~~~~~~~~~
src/views/projects/task/components/node/tasks/use-dependent.ts:33:26 - error TS2352: Conversion of type '{ name: string; taskPriority?: string; isCache?: "YES" | "NO"; timeoutFlag: false | "OPEN" | "CLOSE"; timeoutNotifyStrategy: string | undefined[]; taskParams?: ITaskParams; ... 279 more ...; timeoutShowFlag: boolean; }' to type 'INodeData' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
Types of property 'isCache' are incompatible.
Type 'string' is not comparable to type 'boolean'.
Type 'string' is not comparable to type 'boolean'.
33 const model = reactive({
~
34 taskType: 'DEPENDENT',
~~~~~~~~~~~~~~~~~~~~~~~~~~
...
53 ...data
~~~~~~~~~~~
54 } as INodeData)
~~~~~~~~~~~~~~~~
src/views/projects/workflow/definition/tree/index.tsx:74:11 - error TS2322: Type 'Ref<({ taskType: string; color: string; image: string; } | { taskType: string; color: string; image?: unknown; })[], ({ taskType: string; color: string; image: string; } | { taskType: string; color: string; image?: undefined; })[] | ({ ...; } | { ...; })[]>' is not assignable to type 'Ref<ITaskTypeNodeOption[], ITaskTypeNodeOption[]>'.
Type '({ taskType: string; color: string; image: string; } | { taskType: string; color: string; image?: unknown; })[]' is not assignable to type 'ITaskTypeNodeOption[]'.
Type '{ taskType: string; color: string; image: string; } | { taskType: string; color: string; image?: unknown; }' is not assignable to type 'ITaskTypeNodeOption'.
Type '{ taskType: string; color: string; image?: unknown; }' is not assignable to type 'ITaskTypeNodeOption'.
Types of property 'image' are incompatible.
Type 'unknown' is not assignable to type 'string'.
74 const taskTypeNodeOptions: Ref<Array<ITaskTypeNodeOption>> = ref([
~~~~~~~~~~~~~~~~~~~
src/views/resource/task-group/option/use-table.ts:53:5 - error TS2322: Type '{ width: number; ellipsis: { tooltip: boolean; }; title: string; key: string; }' is not assignable to type 'TableColumn<any>'.
Type '{ width: number; ellipsis: { tooltip: boolean; }; title: string; key: string; }' is not assignable to type 'TableBaseColumn<any>'.
Type '{ width: number; ellipsis: { tooltip: boolean; }; title: string; key: string; }' is not assignable to type 'CommonColumnInfo<any>'.
Types of property 'ellipsis' are incompatible.
Type '{ tooltip: boolean; }' is not assignable to type 'Ellipsis'.
Type '{ tooltip: boolean; }' is not assignable to type 'EllipsisProps & { style?: CSSProperties; }'.
Type '{ tooltip: boolean; }' is not assignable to type 'EllipsisProps'.
Types of property 'tooltip' are incompatible.
Type 'boolean' is not assignable to type 'true'.
53 {
~
54 title: t('resource.task_group_option.name'),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
56 ...COLUMN_WIDTH_CONFIG['name']
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
57 },
~~~~~
src/views/resource/task-group/option/use-table.ts:58:5 - error TS2322: Type '{ width: number; ellipsis: { tooltip: boolean; }; title: string; key: string; }' is not assignable to type 'TableColumn<any>'.
Type '{ width: number; ellipsis: { tooltip: boolean; }; title: string; key: string; }' is not assignable to type 'TableBaseColumn<any>'.
Type '{ width: number; ellipsis: { tooltip: boolean; }; title: string; key: string; }' is not assignable to type 'CommonColumnInfo<any>'.
Types of property 'ellipsis' are incompatible.
Type '{ tooltip: boolean; }' is not assignable to type 'Ellipsis'.
58 {
~
59 title: t('resource.task_group_option.project_name'),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
61 ...COLUMN_WIDTH_CONFIG['name']
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
62 },
~~~~~
src/views/resource/task-group/option/use-table.ts:73:5 - error TS2322: Type '{ width: number; ellipsis: { tooltip: boolean; }; title: string; key: string; }' is not assignable to type 'TableColumn<any>'.
Type '{ width: number; ellipsis: { tooltip: boolean; }; title: string; key: string; }' is not assignable to type 'TableBaseColumn<any>'.
Type '{ width: number; ellipsis: { tooltip: boolean; }; title: string; key: string; }' is not assignable to type 'CommonColumnInfo<any>'.
Types of property 'ellipsis' are incompatible.
Type '{ tooltip: boolean; }' is not assignable to type 'Ellipsis'.
Type '{ tooltip: boolean; }' is not assignable to type 'EllipsisProps & { style?: CSSProperties; }'.
Type '{ tooltip: boolean; }' is not assignable to type 'EllipsisProps'.
Types of property 'tooltip' are incompatible.
Type 'boolean' is not assignable to type 'true'.
73 {
~
74 title: t('resource.task_group_option.desc'),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
76 ...COLUMN_WIDTH_CONFIG['note']
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
77 },
~~~~~
src/views/resource/task-group/queue/use-table.ts:48:5 - error TS2322: Type '{ width: number; ellipsis: { tooltip: boolean; }; title: string; key: string; }' is not assignable to type 'TableColumn<any>'.
Type '{ width: number; ellipsis: { tooltip: boolean; }; title: string; key: string; }' is not assignable to type 'TableBaseColumn<any>'.
Type '{ width: number; ellipsis: { tooltip: boolean; }; title: string; key: string; }' is not assignable to type 'CommonColumnInfo<any>'.
Types of property 'ellipsis' are incompatible.
Type '{ tooltip: boolean; }' is not assignable to type 'Ellipsis'.
48 {
~
49 title: t('resource.task_group_queue.project_name'),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
51 ...COLUMN_WIDTH_CONFIG['name']
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
52 },
~~~~~
src/views/resource/task-group/queue/use-table.ts:53:5 - error TS2322: Type '{ width: number; ellipsis: { tooltip: boolean; }; title: string; key: string; }' is not assignable to type 'TableColumn<any>'.
Type '{ width: number; ellipsis: { tooltip: boolean; }; title: string; key: string; }' is not assignable to type 'TableBaseColumn<any>'.
Type '{ width: number; ellipsis: { tooltip: boolean; }; title: string; key: string; }' is not assignable to type 'CommonColumnInfo<any>'.
Types of property 'ellipsis' are incompatible.
Type '{ tooltip: boolean; }' is not assignable to type 'Ellipsis'.
53 {
~
54 title: t('resource.task_group_queue.task_name'),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
56 ...COLUMN_WIDTH_CONFIG['name']
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
57 },
~~~~~
src/views/resource/task-group/queue/use-table.ts:58:5 - error TS2322: Type '{ width: number; ellipsis: { tooltip: boolean; }; title: string; key: string; }' is not assignable to type 'TableColumn<any>'.
Type '{ width: number; ellipsis: { tooltip: boolean; }; title: string; key: string; }' is not assignable to type 'TableBaseColumn<any>'.
Type '{ width: number; ellipsis: { tooltip: boolean; }; title: string; key: string; }' is not assignable to type 'CommonColumnInfo<any>'.
Types of property 'ellipsis' are incompatible.
Type '{ tooltip: boolean; }' is not assignable to type 'Ellipsis'.
58 {
~
59 title: t('resource.task_group_queue.workflow_instance_name'),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
61 ...COLUMN_WIDTH_CONFIG['name']
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
62 },
~~~~~
src/views/resource/task-group/queue/use-table.ts:63:5 - error TS2322: Type '{ width: number; ellipsis: { tooltip: boolean; }; title: string; key: string; }' is not assignable to type 'TableColumn<any>'.
Type '{ width: number; ellipsis: { tooltip: boolean; }; title: string; key: string; }' is not assignable to type 'TableBaseColumn<any>'.
Type '{ width: number; ellipsis: { tooltip: boolean; }; title: string; key: string; }' is not assignable to type 'CommonColumnInfo<any>'.
Types of property 'ellipsis' are incompatible.
Type '{ tooltip: boolean; }' is not assignable to type 'Ellipsis'.
63 {
~
64 title: t('resource.task_group_queue.task_group_name'),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
66 ...COLUMN_WIDTH_CONFIG['name']
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
67 },
~~~~~
src/views/security/user-manage/use-columns.ts:263:7 - error TS2322: Type '({ width: number; title: string; key: string; render: (rowData: InternalRowData, rowIndex: number) => number; } | { width: number; ellipsis: { tooltip: boolean; }; title: string; key: string; className: string; } | { ...; } | { ...; } | { ...; } | { ...; })[]' is not assignable to type 'TableColumns<InternalRowData> | ({ title?: TableColumnGroupTitle; type?: never; key: ColumnKey; children: { title?: TableColumnTitle; ... 31 more ...; cellProps?: (rowData: InternalRowData, rowIndex: number) => HTMLAttributes; }[]; ... 9 more ...; cellProps?: (rowData: InternalRowData, rowIndex: number) => HTMLAttri...'.
Type '({ width: number; title: string; key: string; render: (rowData: InternalRowData, rowIndex: number) => number; } | { width: number; ellipsis: { tooltip: boolean; }; title: string; key: string; className: string; } | { ...; } | { ...; } | { ...; } | { ...; })[]' is not assignable to type 'TableColumns<InternalRowData>'.
263 columns,
~~~~~~~
src/views/security/user-manage/use-columns.ts:52:5
52 columns: [] as TableColumns,
~~~~~~~~~~~~~~~~~~~~~~~~~~~
The expected type comes from property 'columns' which is declared here on type '{ columns: TableColumns<InternalRowData>; tableWidth: number; } | { columns: ({ title?: TableColumnGroupTitle; type?: never; ... 11 more ...; cellProps?: (rowData: InternalRowData, rowIndex: number) => HTMLAttributes; } | { ...; } | { ...; } | { ...; })[]; tableWidth: number; }'
src/views/security/user-manage/use-columns.ts:264:39 - error TS2345: Argument of type '({ width: number; title: string; key: string; render: (rowData: InternalRowData, rowIndex: number) => number; } | { width: number; ellipsis: { tooltip: boolean; }; title: string; key: string; className: string; } | { ...; } | { ...; } | { ...; } | { ...; })[]' is not assignable to parameter of type 'TableColumns<InternalRowData>'.
Type '{ width: number; title: string; key: string; render: (rowData: InternalRowData, rowIndex: number) => number; } | { width: number; ellipsis: { tooltip: boolean; }; title: string; key: string; className: string; } | { ...; } | { ...; } | { ...; } | { ...; }' is not assignable to type 'TableColumn<InternalRowData>'.
Type '{ width: number; ellipsis: { tooltip: boolean; }; title: string; key: string; className: string; }' is not assignable to type 'TableColumn<InternalRowData>'.
Type '{ width: number; ellipsis: { tooltip: boolean; }; title: string; key: string; className: string; }' is not assignable to type 'TableBaseColumn<InternalRowData>'.
Type '{ width: number; ellipsis: { tooltip: boolean; }; title: string; key: string; className: string; }' is not assignable to type 'CommonColumnInfo<InternalRowData>'.
Types of property 'ellipsis' are incompatible.
Type '{ tooltip: boolean; }' is not assignable to type 'Ellipsis'.
Type '{ tooltip: boolean; }' is not assignable to type 'EllipsisProps & { style?: CSSProperties; }'.
Type '{ tooltip: boolean; }' is not assignable to type 'EllipsisProps'.
Types of property 'tooltip' are incompatible.
Type 'boolean' is not assignable to type 'true'.
264 tableWidth: calculateTableWidth(columns)
~~~~~~~
Found 16 errors in 7 files.
Errors Files
1 src/views/datasource/list/use-form.ts:303
3 src/views/projects/task/components/node/fields/use-dependent.ts:350
2 src/views/projects/task/components/node/tasks/use-dependent.ts:33
1 src/views/projects/workflow/definition/tree/index.tsx:74
3 src/views/resource/task-group/option/use-table.ts:53
4 src/views/resource/task-group/queue/use-table.ts:48
2 src/views/security/user-manage/use-columns.ts:263
ELIFECYCLE Command failed with exit code 2.
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org