deno lint stupid

This commit is contained in:
ITOH
2021-05-02 21:30:26 +02:00
parent 4f591320be
commit 2396ba2ce4
2 changed files with 3 additions and 1 deletions
+1 -1
View File
@@ -90,7 +90,7 @@ export async function editChannel(
}
const payload = {
...camelKeysToSnakeCase<{}>(options),
...camelKeysToSnakeCase<Record<string, unknown>>(options),
// deno-lint-ignore camelcase
permission_overwrites:
hasOwnProperty<ModifyChannel>(options, "permissionOverwrites")
+2
View File
@@ -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<T extends {}, Y extends PropertyKey = string>(
obj: T,
prop: Y,
): obj is T & Record<Y, unknown> {
// deno-lint-ignore no-prototype-builtins
return obj.hasOwnProperty(prop);
}