mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 11:28:15 +00:00
deno lint stupid
This commit is contained in:
@@ -90,7 +90,7 @@ export async function editChannel(
|
|||||||
}
|
}
|
||||||
|
|
||||||
const payload = {
|
const payload = {
|
||||||
...camelKeysToSnakeCase<{}>(options),
|
...camelKeysToSnakeCase<Record<string, unknown>>(options),
|
||||||
// deno-lint-ignore camelcase
|
// deno-lint-ignore camelcase
|
||||||
permission_overwrites:
|
permission_overwrites:
|
||||||
hasOwnProperty<ModifyChannel>(options, "permissionOverwrites")
|
hasOwnProperty<ModifyChannel>(options, "permissionOverwrites")
|
||||||
|
|||||||
@@ -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
|
// 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/
|
// Taken from https://fettblog.eu/typescript-hasownproperty/
|
||||||
/** TS save way to check if a property exists in an object */
|
/** 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>(
|
export function hasOwnProperty<T extends {}, Y extends PropertyKey = string>(
|
||||||
obj: T,
|
obj: T,
|
||||||
prop: Y,
|
prop: Y,
|
||||||
): obj is T & Record<Y, unknown> {
|
): obj is T & Record<Y, unknown> {
|
||||||
|
// deno-lint-ignore no-prototype-builtins
|
||||||
return obj.hasOwnProperty(prop);
|
return obj.hasOwnProperty(prop);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user