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

Bump typescript to 4.6.4 #879

Merged
merged 23 commits into from
Sep 28, 2023
Merged

Conversation

gulderov
Copy link
Contributor

@gulderov gulderov commented Jul 12, 2023

Description

Bump typescript to 4.6.4

Issues Resolved

closes #888
closes #887

Check List

  • All tests pass
    • yarn lint
    • yarn test-unit
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@@ -135,7 +135,7 @@ export const GuideSection: FunctionComponent<GuideSection> = ({
const isPlaygroundUnsupported =
typeof window !== 'undefined' &&
typeof document !== 'undefined' &&
!!window.MSInputMethodContext &&
!!(window as any).MSInputMethodContext &&
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't love adding new code with any. Could this be cast as object or unknown instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe, we could consider completely removing this. Please look at the follow up issue #886

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alternatively, we can add the following code to index.d.ts

interface Window {
  MSInputMethodContext?: any; // is IE11
}

interface Document {
  documentMode?: any; // is IE11
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point about fixing it by adding to global types. The usage of any is common to highlight areas of uncertainty or complexity in typescript. It is usually recommended to avoid it if possible

In this case it should be safe to mark some pain point by as any. It could be more scary to cleanup index.d.ts in future, than cleanup local usage of any. My preference is to keep theindex.d.ts nice and clean.

On other hand I cant see better cast here and we have issue #886 for refactoring

Comment on lines -59 to -63
return 'innerText' in element
? element.innerText
: // (this line left here to satisfy Prettier since a ts-ignore is used on the next line)
// @ts-ignore TypeScript thinks element.innerText always exists, however it doesn't in jest/jsdom environment
element.textContent || undefined;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love that we're able to get rid of this @ts-ignore

src/components/header/header_links/header_links.tsx Outdated Show resolved Hide resolved
@@ -115,7 +115,7 @@ export const OuiPinnableListGroup: FunctionComponent<OuiPinnableListGroupProps>
);

// Add the pinning action unless the item has it's own extra action
if (onPinClick && !itemProps.extraAction && pinnable) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is onPinClick removed here? From a brief look at the code, it seems like it should be null checked

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The onPinClick is defined as required prop for OuiPinnableListGroup component. Typescript will give error, if onPinClick is not provided. So no extra validation needed. I hope we can benefit from type checking here

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Compile-time warning cannot take the place of proper guarding. There are many scenarios that TS will not be able check during compiling.

That said, onPinClick check shouldn't be up there but should be added down.

if (onPinClick) itemProps.extraAction.onClick = () => onPinClick(item);

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I committed the above suggestion.

tsconfig.json Outdated
@@ -40,6 +40,9 @@
// Disallow inconsistently-cased references to the same file.
"forceConsistentCasingInFileNames": true,

// Keep type of the variable in a catch clause as `any`
"useUnknownInCatchVariables": false,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we want to keep it as any? Is there a significant downside of using unknown? Will it involve a substantial amount of extra work? Could it be done in a followup task?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typescript can enhance code quality, but it is also important to keep balance between type safety and ease of use

The useUnknownInCatchVariables option is useful because it enforces a higher level of type safety in catch blocks. However, enabling this option can also lead to additional complexity in code. We would need to add extra type checking code in each catch block.

Let me show on examples

It is common to expect catch variable as instance of Error:

try {
  throw Error('error message');
} catch (error) {
  console.log(error.message); // => LOG: 'error message'
}

but it is not always the case:

try {
  throw 'error message';
} catch (error) {
  console.log(error.message); // => LOG: undefined
}

useUnknownInCatchVariables is intended to catch errors like this:

try {
  throw 123;
} catch (error) {
  if (err instanceof Error) {
    console.log(err.message);
  } else if (typeof err === 'string') {
    console.log(err);
  } else {
    console.log('Unexpected error')

  }
}

or:

try {
  throw 123;
} catch (error) {
  const e = error instanceof Error ? error : Error( `Unexpected Error: ${error}`);
   console.log(e.message);
}

Same time it is much easier to avoid checks by ignoring types:

try {
    throw new OwnError(123);
} catch (error: unknown) {
    console.log((error as OwnError).message);
}

or even:

try {
  throw new Error(123);
} catch (error : any) {
   console.log(error.message);
}

While enabling useUnknownInCatchVariables could potentially catch errors, it might also introduce extra complexity into codebase. I am cautious about making this change, especially since the useUnknownInCatchVariables is enabled by default.

I would be happy to make this change, if benefits of enabling useUnknownInCatchVariables outweigh potential downsides. Please let me know if you want to proceed with this and I will create a followup task

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a good idea to reduce complexity and remove conditions inside the catch block, but I think type safety and robust error handling have a higher weight than reducing complexity like that, so for me, it's better to use unknown rather than any for error variables in catch clauses

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There seems to be some confusion regarding this change. I have created issue #887 to do refactoring with useUnknownInCatchVariables in separate task. It will help to keep this pull request limited.

Could you please review it @BSFishy @SergeyMyssak ?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering if we can avoid this change? I see that you have created an issue to remove it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

useUnknownInCatchVariables is not in tsconfig anymore. We have changes in this pull request to close #887

@@ -159,8 +159,8 @@
"@types/react-router-dom": "^5.3.3",
"@types/url-parse": "^1.4.8",
"@types/uuid": "^9.0.1",
"@typescript-eslint/eslint-plugin": "^4.8.1",
"@typescript-eslint/parser": "^4.8.1",
"@typescript-eslint/eslint-plugin": "^5.62.0",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The @typescript-eslint/eslint-plugin: "^6.0.0" requires at least node v16, but .nvmrc contains 14.20.0

@gulderov gulderov requested a review from BSFishy July 13, 2023 15:58
@@ -135,7 +135,7 @@ export const GuideSection: FunctionComponent<GuideSection> = ({
const isPlaygroundUnsupported =
typeof window !== 'undefined' &&
typeof document !== 'undefined' &&
!!window.MSInputMethodContext &&
!!(window as any).MSInputMethodContext &&
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alternatively, we can add the following code to index.d.ts

interface Window {
  MSInputMethodContext?: any; // is IE11
}

interface Document {
  documentMode?: any; // is IE11
}

src/components/header/header_links/header_links.tsx Outdated Show resolved Hide resolved
Comment on lines 197 to 198
{...(rest as PropsForButton)}
onClick={onClick}>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure we should put onClick after {{...(rest as PropsForButton)}? I understand that TS gives an error there, but it would still be good to understand why it started giving it

Copy link
Contributor Author

@gulderov gulderov Jul 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typescript highlights that onClick is specified more than once, so usage will be overwritten

This is due usage of as PropsForButton, which reintroduces the onClick while it is already picked

  ButtonHTMLAttributes<HTMLButtonElement>,
  'onClick' | 'type'
> & {
  onClick: MouseEventHandler<HTMLButtonElement> | undefined;
};

Provided solution is easer than {...(rest as Omit<PropsForButton, 'onClick'}or refactoring of the PropsForButton or keeping onClick in rest

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really understand why this interface is written as it is, I think it could be simplified and the TS error would disappear:

type PropsForButton = Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'type'>;

Copy link
Contributor Author

@gulderov gulderov Jul 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typing is changed to suggested

tsconfig.json Outdated
@@ -40,6 +40,9 @@
// Disallow inconsistently-cased references to the same file.
"forceConsistentCasingInFileNames": true,

// Keep type of the variable in a catch clause as `any`
"useUnknownInCatchVariables": false,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a good idea to reduce complexity and remove conditions inside the catch block, but I think type safety and robust error handling have a higher weight than reducing complexity like that, so for me, it's better to use unknown rather than any for error variables in catch clauses

CHANGELOG.md Outdated Show resolved Hide resolved
Comment on lines 197 to 198
{...(rest as PropsForButton)}
onClick={onClick}>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really understand why this interface is written as it is, I think it could be simplified and the TS error would disappear:

type PropsForButton = Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'type'>;

CHANGELOG.md Outdated Show resolved Hide resolved
tsconfig.json Outdated
@@ -40,6 +40,9 @@
// Disallow inconsistently-cased references to the same file.
"forceConsistentCasingInFileNames": true,

// Keep type of the variable in a catch clause as `any`
"useUnknownInCatchVariables": false,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering if we can avoid this change? I see that you have created an issue to remove it

@gulderov gulderov changed the title Update TypeScript Bump typescript to 4.6.4 Jul 18, 2023
gulderov added 12 commits July 18, 2023 14:33
Signed-off-by: Danila Gulderov <[email protected]>
Signed-off-by: Danila Gulderov <[email protected]>
Signed-off-by: Danila Gulderov <[email protected]>
Signed-off-by: Danila Gulderov <[email protected]>
Signed-off-by: Danila Gulderov <[email protected]>
Signed-off-by: Danila Gulderov <[email protected]>
Signed-off-by: Danila Gulderov <[email protected]>
bump typescript-eslint/parser: 5.62.0

node 16 is required for typescript-eslint: 6.0.0

Signed-off-by: Danila Gulderov <[email protected]>
Signed-off-by: Danila Gulderov <[email protected]>
Signed-off-by: Danila Gulderov <[email protected]>
Signed-off-by: Danila Gulderov <[email protected]>
Signed-off-by: Danila Gulderov <[email protected]>
Signed-off-by: Danila Gulderov <[email protected]>
Signed-off-by: Danila Gulderov <[email protected]>
Copy link
Collaborator

@SergeyMyssak SergeyMyssak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gulderov well done, thank you for your contribution! All that's left is to fix the merge conflicts.

@BSFishy, are we going to backport this PR to 1.x?

@BSFishy
Copy link
Contributor

BSFishy commented Jul 20, 2023

@BSFishy, are we going to backport this PR to 1.x?

Yep, I don't see any public API changes, so this should be good to go.

I'd also like to get another pair of eyes or two on this, as its blast radius might be a little bit larger than we usually have. Pinging people now

Copy link
Member

@joshuarrrr joshuarrrr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

: // (this line left here to satisfy Prettier since a ts-ignore is used on the next line)
// @ts-ignore TypeScript thinks element.innerText always exists, however it doesn't in jest/jsdom environment
element.textContent || undefined;
return 'innerText' in element ? element.innerText : element.textContent || '';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like we're changing the return type to string from string | undefined - is this intentional, and does it have any effect in caller contexts?

Copy link
Collaborator

@AMoo-Miki AMoo-Miki Sep 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While i think it will impact the caller contexts, i believe the previous behavior of returning undefined was wrong.

CHANGELOG.md Outdated Show resolved Hide resolved
Comment on lines 356 to 361
const message = e instanceof Error ? e.message : String(e);

error(
`Invalid value \`${expression}\` set for field \`${field}\` - ${e.message}`,
`Invalid value \`${expression}\` set for field \`${field}\` - ${message}`,
location
);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's strengthen this a bit:

     const message = (e instanceof Error ? e.message || e.code : String(e)).trim();

      error(
        `Invalid value \`${expression}\` set for field \`${field}\`${message ? ` - ${message}` : '' }`,
        location
      );

Copy link
Collaborator

@AMoo-Miki AMoo-Miki Sep 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I committed a nicer version of the above suggestion.
PS, tsc didn't like that. Will adjust it.

Move CHANGELOG entry to the unreleased section 

Signed-off-by: Miki <[email protected]>
Update pinnable_list_group.tsx

Signed-off-by: Miki <[email protected]>
Update default_syntax.ts

Signed-off-by: Miki <[email protected]>
Update default_syntax.ts

Signed-off-by: Miki <[email protected]>
@AMoo-Miki AMoo-Miki merged commit 1fe770c into opensearch-project:main Sep 28, 2023
14 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Sep 28, 2023
* typescript bump: 4.1.6

Signed-off-by: Danila Gulderov <[email protected]>

* typescript bump: 4.2.4

Signed-off-by: Danila Gulderov <[email protected]>

* typescript bump: 4.3.5

Signed-off-by: Danila Gulderov <[email protected]>

* typescript bump: 4.4.4

Signed-off-by: Danila Gulderov <[email protected]>

* typescript bump: 4.5.5

Signed-off-by: Danila Gulderov <[email protected]>

* typescript bump: 4.6.4

Signed-off-by: Danila Gulderov <[email protected]>

* CHANGELOG.md updated

Signed-off-by: Danila Gulderov <[email protected]>

* bump typescript-eslint/eslint-plugin: 5.62.0
bump typescript-eslint/parser: 5.62.0

node 16 is required for typescript-eslint: 6.0.0

Signed-off-by: Danila Gulderov <[email protected]>

* CHANGELOG.md update

Signed-off-by: Danila Gulderov <[email protected]>

* move typescript update to regular section

Signed-off-by: Danila Gulderov <[email protected]>

* changelog message improvement

Signed-off-by: Danila Gulderov <[email protected]>

* fix typings

Signed-off-by: Danila Gulderov <[email protected]>

* cleanup useUnknownInCatchVariables

Signed-off-by: Danila Gulderov <[email protected]>

* logical or => nullish coalescing

Signed-off-by: Danila Gulderov <[email protected]>

* wrap with String

Signed-off-by: Danila Gulderov <[email protected]>

* Update CHANGELOG.md

Move CHANGELOG entry to the unreleased section

Signed-off-by: Miki <[email protected]>

* Add back `onPinClick` check in `OuiPinnableListGroup`

Update pinnable_list_group.tsx

Signed-off-by: Miki <[email protected]>

* Enhance error message extraction in `validateFieldValue`

Update default_syntax.ts

Signed-off-by: Miki <[email protected]>

* Remove e.code from default_syntax.ts

Update default_syntax.ts

Signed-off-by: Miki <[email protected]>

* Lint default_syntax.ts

Signed-off-by: Miki <[email protected]>

---------

Signed-off-by: Danila Gulderov <[email protected]>
Signed-off-by: Matt Provost <[email protected]>
Signed-off-by: Miki <[email protected]>
Co-authored-by: Matt Provost <[email protected]>
Co-authored-by: Josh Romero <[email protected]>
Co-authored-by: Miki <[email protected]>
(cherry picked from commit 1fe770c)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

# Conflicts:
#	CHANGELOG.md
joshuarrrr pushed a commit that referenced this pull request Sep 28, 2023
* typescript bump: 4.1.6

Signed-off-by: Danila Gulderov <[email protected]>

* typescript bump: 4.2.4

Signed-off-by: Danila Gulderov <[email protected]>

* typescript bump: 4.3.5

Signed-off-by: Danila Gulderov <[email protected]>

* typescript bump: 4.4.4

Signed-off-by: Danila Gulderov <[email protected]>

* typescript bump: 4.5.5

Signed-off-by: Danila Gulderov <[email protected]>

* typescript bump: 4.6.4

Signed-off-by: Danila Gulderov <[email protected]>

* CHANGELOG.md updated

Signed-off-by: Danila Gulderov <[email protected]>

* bump typescript-eslint/eslint-plugin: 5.62.0
bump typescript-eslint/parser: 5.62.0

node 16 is required for typescript-eslint: 6.0.0

Signed-off-by: Danila Gulderov <[email protected]>

* CHANGELOG.md update

Signed-off-by: Danila Gulderov <[email protected]>

* move typescript update to regular section

Signed-off-by: Danila Gulderov <[email protected]>

* changelog message improvement

Signed-off-by: Danila Gulderov <[email protected]>

* fix typings

Signed-off-by: Danila Gulderov <[email protected]>

* cleanup useUnknownInCatchVariables

Signed-off-by: Danila Gulderov <[email protected]>

* logical or => nullish coalescing

Signed-off-by: Danila Gulderov <[email protected]>

* wrap with String

Signed-off-by: Danila Gulderov <[email protected]>

* Update CHANGELOG.md

Move CHANGELOG entry to the unreleased section

Signed-off-by: Miki <[email protected]>

* Add back `onPinClick` check in `OuiPinnableListGroup`

Update pinnable_list_group.tsx

Signed-off-by: Miki <[email protected]>

* Enhance error message extraction in `validateFieldValue`

Update default_syntax.ts

Signed-off-by: Miki <[email protected]>

* Remove e.code from default_syntax.ts

Update default_syntax.ts

Signed-off-by: Miki <[email protected]>

* Lint default_syntax.ts

Signed-off-by: Miki <[email protected]>

---------

Signed-off-by: Danila Gulderov <[email protected]>
Signed-off-by: Matt Provost <[email protected]>
Signed-off-by: Miki <[email protected]>
Co-authored-by: Matt Provost <[email protected]>
Co-authored-by: Josh Romero <[email protected]>
Co-authored-by: Miki <[email protected]>
(cherry picked from commit 1fe770c)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

# Conflicts:
#	CHANGELOG.md

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@joshuarrrr
Copy link
Member

Thanks @gulderov ! This was a very valuable contribution!

ShatilKhan pushed a commit to ShatilKhan/oui that referenced this pull request Nov 17, 2023
* typescript bump: 4.1.6

Signed-off-by: Danila Gulderov <[email protected]>

* typescript bump: 4.2.4

Signed-off-by: Danila Gulderov <[email protected]>

* typescript bump: 4.3.5

Signed-off-by: Danila Gulderov <[email protected]>

* typescript bump: 4.4.4

Signed-off-by: Danila Gulderov <[email protected]>

* typescript bump: 4.5.5

Signed-off-by: Danila Gulderov <[email protected]>

* typescript bump: 4.6.4

Signed-off-by: Danila Gulderov <[email protected]>

* CHANGELOG.md updated

Signed-off-by: Danila Gulderov <[email protected]>

* bump typescript-eslint/eslint-plugin: 5.62.0
bump typescript-eslint/parser: 5.62.0

node 16 is required for typescript-eslint: 6.0.0

Signed-off-by: Danila Gulderov <[email protected]>

* CHANGELOG.md update

Signed-off-by: Danila Gulderov <[email protected]>

* move typescript update to regular section

Signed-off-by: Danila Gulderov <[email protected]>

* changelog message improvement

Signed-off-by: Danila Gulderov <[email protected]>

* fix typings

Signed-off-by: Danila Gulderov <[email protected]>

* cleanup useUnknownInCatchVariables

Signed-off-by: Danila Gulderov <[email protected]>

* logical or => nullish coalescing

Signed-off-by: Danila Gulderov <[email protected]>

* wrap with String

Signed-off-by: Danila Gulderov <[email protected]>

* Update CHANGELOG.md

Move CHANGELOG entry to the unreleased section

Signed-off-by: Miki <[email protected]>

* Add back `onPinClick` check in `OuiPinnableListGroup`

Update pinnable_list_group.tsx

Signed-off-by: Miki <[email protected]>

* Enhance error message extraction in `validateFieldValue`

Update default_syntax.ts

Signed-off-by: Miki <[email protected]>

* Remove e.code from default_syntax.ts

Update default_syntax.ts

Signed-off-by: Miki <[email protected]>

* Lint default_syntax.ts

Signed-off-by: Miki <[email protected]>

---------

Signed-off-by: Danila Gulderov <[email protected]>
Signed-off-by: Matt Provost <[email protected]>
Signed-off-by: Miki <[email protected]>
Co-authored-by: Matt Provost <[email protected]>
Co-authored-by: Josh Romero <[email protected]>
Co-authored-by: Miki <[email protected]>
Signed-off-by: ShatilKhan <[email protected]>
ShatilKhan pushed a commit to ShatilKhan/oui that referenced this pull request Nov 17, 2023
* typescript bump: 4.1.6

Signed-off-by: Danila Gulderov <[email protected]>

* typescript bump: 4.2.4

Signed-off-by: Danila Gulderov <[email protected]>

* typescript bump: 4.3.5

Signed-off-by: Danila Gulderov <[email protected]>

* typescript bump: 4.4.4

Signed-off-by: Danila Gulderov <[email protected]>

* typescript bump: 4.5.5

Signed-off-by: Danila Gulderov <[email protected]>

* typescript bump: 4.6.4

Signed-off-by: Danila Gulderov <[email protected]>

* CHANGELOG.md updated

Signed-off-by: Danila Gulderov <[email protected]>

* bump typescript-eslint/eslint-plugin: 5.62.0
bump typescript-eslint/parser: 5.62.0

node 16 is required for typescript-eslint: 6.0.0

Signed-off-by: Danila Gulderov <[email protected]>

* CHANGELOG.md update

Signed-off-by: Danila Gulderov <[email protected]>

* move typescript update to regular section

Signed-off-by: Danila Gulderov <[email protected]>

* changelog message improvement

Signed-off-by: Danila Gulderov <[email protected]>

* fix typings

Signed-off-by: Danila Gulderov <[email protected]>

* cleanup useUnknownInCatchVariables

Signed-off-by: Danila Gulderov <[email protected]>

* logical or => nullish coalescing

Signed-off-by: Danila Gulderov <[email protected]>

* wrap with String

Signed-off-by: Danila Gulderov <[email protected]>

* Update CHANGELOG.md

Move CHANGELOG entry to the unreleased section

Signed-off-by: Miki <[email protected]>

* Add back `onPinClick` check in `OuiPinnableListGroup`

Update pinnable_list_group.tsx

Signed-off-by: Miki <[email protected]>

* Enhance error message extraction in `validateFieldValue`

Update default_syntax.ts

Signed-off-by: Miki <[email protected]>

* Remove e.code from default_syntax.ts

Update default_syntax.ts

Signed-off-by: Miki <[email protected]>

* Lint default_syntax.ts

Signed-off-by: Miki <[email protected]>

---------

Signed-off-by: Danila Gulderov <[email protected]>
Signed-off-by: Matt Provost <[email protected]>
Signed-off-by: Miki <[email protected]>
Co-authored-by: Matt Provost <[email protected]>
Co-authored-by: Josh Romero <[email protected]>
Co-authored-by: Miki <[email protected]>
Signed-off-by: ShatilKhan <[email protected]>
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.

Bump typescript to 4.6.4 useUnknownInCatchVariables reset
5 participants