Skip to content

Commit

Permalink
refactor(api): TS3.0 PropertyKey handling
Browse files Browse the repository at this point in the history
  • Loading branch information
postspectacular committed Aug 1, 2018
1 parent c7f7244 commit 2047807
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/api/src/decorators/deprecated.ts
Expand Up @@ -10,7 +10,7 @@ import { illegalArgs } from "@thi.ng/errors";
*/
export function deprecated(msg?: string, log = console.log): MethodDecorator {
return function (target: any, prop: string | symbol, descriptor: PropertyDescriptor) {
const signature = `${target.constructor.name}#${prop}`;
const signature = `${target.constructor.name}#${prop.toString()}`;
const fn = descriptor.value;
if (typeof fn !== "function") {
illegalArgs(`${signature} is not a function`);
Expand Down
2 changes: 1 addition & 1 deletion packages/api/src/mixin.ts
Expand Up @@ -24,7 +24,7 @@ export function mixin(behaviour: any, sharedBehaviour = {}) {
writable: true,
});
} else {
console.log(`not patching: ${clazz.name}.${key}`);
console.log(`not patching: ${clazz.name}.${key.toString()}`);
}
}
Object.defineProperty(clazz.prototype, typeTag, { value: true });
Expand Down

0 comments on commit 2047807

Please sign in to comment.