Conversation
| keybinding.unbind = function(selection) { | ||
| _keybindings = []; | ||
| keybinding.unbind = function(selection?: d3.Selection) { | ||
| _keybindings = {}; |
There was a problem hiding this comment.
this was presumably a typo, that happens to still works
| return keybinding.off(codes, capture); | ||
| } | ||
|
|
||
| var arr = utilArrayUniq([].concat(codes)); |
There was a problem hiding this comment.
this shallow clone is redundant since utilArrayUniq does not mutate its input
tyrasd
left a comment
There was a problem hiding this comment.
Thanks! 🤗
Only very partial review of the PR, but see a few details I noticed already below.
| @@ -1,26 +1,24 @@ | |||
| export function utilObjectOmit(obj, omitKeys) { | |||
| return Object.keys(obj).reduce(function(result, key) { | |||
| export function utilObjectOmit<T extends object, K extends keyof T>(obj: T, omitKeys: K[]): Omit<T, K> { | |||
There was a problem hiding this comment.
this could be replaced by es-toolkit's omit?
//edit: this is probably also true for a lot of the methods in array.ts which also exist identically in es-toolkit. Perhaps it's better to migrate them to typescript as proposed, and replace them with es-toolkit's methods in a later step separately.
There was a problem hiding this comment.
yeah i agree, shall we do this in a separate PR?
originally I was just going to edit
util/*(since future PRs depend on these files), but I added some other files that are trivial to convert