Add & register more basic commands
This commit is contained in:
@@ -3,6 +3,8 @@ export type Awaitable<T> = T | Promise<T>
|
||||
export type JSONScalar = string | boolean | number | undefined
|
||||
export type JSONData = JSONScalar | Array<JSONScalar | JSONData> | { [key: string]: JSONScalar | JSONData }
|
||||
|
||||
export type ElementType<T extends readonly any[]> = T extends (infer U)[] ? U : never;
|
||||
|
||||
/** A typescript-compatible version of Object.hasOwnProperty. */
|
||||
export function hasOwnProperty<X extends {}, Y extends PropertyKey>(obj: X, prop: Y): obj is X & Record<Y, unknown> { // eslint-disable-line @typescript-eslint/ban-types
|
||||
return Object.hasOwnProperty.call(obj, prop)
|
||||
|
||||
Reference in New Issue
Block a user