treasure-data / digdag

Workload Automation System
https://www.digdag.io/
Apache License 2.0
1.3k stars 221 forks source link

Workaround for error TS2769 #1786

Closed szyn closed 1 year ago

szyn commented 1 year ago

Follow-up #1760.

digdag-ui:checkUi failed due to TS2769. I added ts-expect-error to disable error as a workaround.

..snip..
console.tsx(2041,34): error TS2769: No overload matches this call.
  Overload 1 of 2, '(data: Data, options: InflateFunctionOptions & { to: "string"; }): string', gave the following error.
    Argument of type 'Data | null' is not assignable to parameter of type 'Data'.
      Type 'null' is not assignable to type 'Data'.
  Overload 2 of 2, '(data: Data, options?: InflateFunctionOptions | undefined): Uint8Array', gave the following error.
    Argument of type 'Data | null' is not assignable to parameter of type 'Data'.
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! digdag-ui@1.0.0 type: `tsc --noEmit`
npm ERR! Exit status 2
..snip..