From 2396ba2ce437f877f60b73d32859214e27b55e32 Mon Sep 17 00:00:00 2001 From: ITOH <72305210+itohatweb@users.noreply.github.com> Date: Sun, 2 May 2021 21:30:26 +0200 Subject: [PATCH] deno lint stupid --- src/helpers/channels/edit_channel.ts | 2 +- src/util/utils.ts | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/helpers/channels/edit_channel.ts b/src/helpers/channels/edit_channel.ts index cc8119c81..5319b171b 100644 --- a/src/helpers/channels/edit_channel.ts +++ b/src/helpers/channels/edit_channel.ts @@ -90,7 +90,7 @@ export async function editChannel( } const payload = { - ...camelKeysToSnakeCase<{}>(options), + ...camelKeysToSnakeCase>(options), // deno-lint-ignore camelcase permission_overwrites: hasOwnProperty(options, "permissionOverwrites") diff --git a/src/util/utils.ts b/src/util/utils.ts index d2c0a016d..af2d605b1 100644 --- a/src/util/utils.ts +++ b/src/util/utils.ts @@ -208,9 +208,11 @@ export function validateSlashCommands( // Typescript is not so good as we developers so we need this little utility function to help it out // Taken from https://fettblog.eu/typescript-hasownproperty/ /** TS save way to check if a property exists in an object */ +// deno-lint-ignore ban-types export function hasOwnProperty( obj: T, prop: Y, ): obj is T & Record { + // deno-lint-ignore no-prototype-builtins return obj.hasOwnProperty(prop); }