Uploaded image for project: 'OpenShift Console'
  1. OpenShift Console
  2. CONSOLE-4286

Remove TODO in frontend/@types/console/index.d.ts

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • None
    • None
    • None
    • Improvement
    • 1
    • True
    • Hide
      Need to change build target to es2021 to receive the patch allowing for code removal, which includes optional chaining syntax which webpack 4 cannot read. Thus blocked by CONSOLE-3905
      Show
      Need to change build target to es2021 to receive the patch allowing for code removal, which includes optional chaining syntax which webpack 4 cannot read. Thus blocked by CONSOLE-3905
    • False
    • Code is removed
    • N/A
    • Release Note Not Required
    • No

      There is a TODO in frontend/@types/console/index.d.ts:

       
      // TODO: Remove when upgrading to TypeScript 4.1.2+, which has a type for ListFormat and RelativeTimeFormat.
      declare namespace Intl {
      type ListFormatOptions = {
      localeMatcher: string;
      type: string;
      style: string;
      {color:#b5b3aa}};

      class ListFormat {
      constructor(locales?: Locale | string | undefined, options?: Partial<ListFormatOptions>);
      public format(list?: Iterable<string>): string;
      {color:#b5b3aa}}

      class RelativeTimeFormat {
      constructor(locale: string);
      format(n: number, unit: string);
      {color:#b5b3aa}}
      }

       
      We are currently using typescript 4.5.5 which is is newer than typescript 4.1.2, so this code is safe to remove

              rh-ee-jaclee Jackson Lee
              rh-ee-jaclee Jackson Lee
              YaDan Pei YaDan Pei
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: