Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
refactor(associative): TS3.0 PropertyKey handling
  • Loading branch information
postspectacular committed Aug 1, 2018
1 parent 2047807 commit 2234313
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/associative/src/invert.ts
Expand Up @@ -35,7 +35,7 @@ export function invertMap<K, V>(src: Map<K, V>) {
export function invertObj(src: IObjectOf<PropertyKey>) {
const dest: IObjectOf<PropertyKey> = {};
for (let k in src) {
dest[src[k]] = k;
dest[<any>src[k]] = k;
}
return dest;
}
2 changes: 1 addition & 1 deletion packages/associative/src/select-keys.ts
Expand Up @@ -30,7 +30,7 @@ export function selectKeysObj<T>(src: IObjectOf<T>, ks: Iterable<PropertyKey>):
const dest: IObjectOf<T> = {};
for (let k of ks) {
if (src.hasOwnProperty(k)) {
dest[k] = src[k];
dest[<any>k] = src[<any>k];
}
}
return dest;
Expand Down

0 comments on commit 2234313

Please sign in to comment.