You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The getHashedName function in the tld-parser/src/utils.ts file is marked as async, but it does not contain any asynchronous operations, such as await. The sha256 function looks to be synchronous, and no asynchronous actions look like they are being performed within the function. The async keyword can be removed from the function declaration to avoid confusion.
This change shouldn't affect its functionality, may prevent potential misunderstandings related to the use of the async keyword.
TypeScript is going to complain / warn about the await no longer being needed given the signature changed to Buffer now, so other functions and methods awaiting or using .then() on this function don't need to, will help with code clarity removing await from other methods / functions using this function across the library anyway.
The text was updated successfully, but these errors were encountered:
Issue description:
The
getHashedName
function in thetld-parser/src/utils.ts
file is marked asasync
, but it does not contain any asynchronous operations, such asawait
. Thesha256
function looks to be synchronous, and no asynchronous actions look like they are being performed within the function. Theasync
keyword can be removed from the function declaration to avoid confusion.Affected code:
The issue can be found in the
tld-parser/src/utils.ts
file on line 66:Proposed change:
Remove the async keyword from the function declaration and update the function signature:
Impact:
This change shouldn't affect its functionality, may prevent potential misunderstandings related to the use of the async keyword.
TypeScript is going to complain / warn about the await no longer being needed given the signature changed to Buffer now, so other functions and methods awaiting or using .then() on this function don't need to, will help with code clarity removing await from other methods / functions using this function across the library anyway.
The text was updated successfully, but these errors were encountered: